mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Server: fixed signatures and type-checks for logger
this might not be a MainLogger instance, but it definitely has to be an \AttachableThreadedLogger instance.
This commit is contained in:
@@ -574,7 +574,7 @@ class Server{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return MainLogger
|
* @return \AttachableThreadedLogger
|
||||||
*/
|
*/
|
||||||
public function getLogger(){
|
public function getLogger(){
|
||||||
return $this->logger;
|
return $this->logger;
|
||||||
@@ -1399,12 +1399,12 @@ class Server{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \ClassLoader $autoloader
|
* @param \ClassLoader $autoloader
|
||||||
* @param \ThreadedLogger $logger
|
* @param \AttachableThreadedLogger $logger
|
||||||
* @param string $dataPath
|
* @param string $dataPath
|
||||||
* @param string $pluginPath
|
* @param string $pluginPath
|
||||||
*/
|
*/
|
||||||
public function __construct(\ClassLoader $autoloader, \ThreadedLogger $logger, string $dataPath, string $pluginPath){
|
public function __construct(\ClassLoader $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");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user