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