mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 18:29:46 +00:00
Server: require a DynamicClassLoader instance
This commit is contained in:
parent
c36377ea5a
commit
771ccbb727
@ -260,7 +260,7 @@ class Server{
|
||||
/** @var UUID */
|
||||
private $serverID;
|
||||
|
||||
/** @var \ClassLoader */
|
||||
/** @var \DynamicClassLoader */
|
||||
private $autoloader;
|
||||
/** @var string */
|
||||
private $dataPath;
|
||||
@ -456,7 +456,7 @@ class Server{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \ClassLoader
|
||||
* @return \DynamicClassLoader
|
||||
*/
|
||||
public function getLoader(){
|
||||
return $this->autoloader;
|
||||
@ -971,12 +971,12 @@ class Server{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \ClassLoader $autoloader
|
||||
* @param \DynamicClassLoader $autoloader
|
||||
* @param \AttachableThreadedLogger $logger
|
||||
* @param string $dataPath
|
||||
* @param string $pluginPath
|
||||
*/
|
||||
public function __construct(\ClassLoader $autoloader, \AttachableThreadedLogger $logger, string $dataPath, string $pluginPath){
|
||||
public function __construct(\DynamicClassLoader $autoloader, \AttachableThreadedLogger $logger, string $dataPath, string $pluginPath){
|
||||
if(self::$instance !== null){
|
||||
throw new \InvalidStateException("Only one server instance can exist at once");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user