mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +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:
parent
5e91c05424
commit
78b5cc993b
@ -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");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user