mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 09:26:06 +00:00
Added new global autoloader
This commit is contained in:
@ -117,6 +117,7 @@ class Server{
|
||||
|
||||
private $serverID;
|
||||
|
||||
private $autoloader;
|
||||
private $filePath;
|
||||
private $dataPath;
|
||||
private $pluginPath;
|
||||
@ -299,6 +300,13 @@ class Server{
|
||||
return $this->getConfigString("motd", "");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SplClassLoader
|
||||
*/
|
||||
public function getLoader(){
|
||||
return $this->autoloader;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PluginManager
|
||||
*/
|
||||
@ -445,13 +453,15 @@ class Server{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \SplClassLoader $autoloader
|
||||
* @param string $filePath
|
||||
* @param string $dataPath
|
||||
* @param string $pluginPath
|
||||
*/
|
||||
public function __construct($filePath, $dataPath, $pluginPath){
|
||||
public function __construct(\SplClassLoader $autoloader, $filePath, $dataPath, $pluginPath){
|
||||
self::$instance = $this;
|
||||
|
||||
$this->autoloader = $autoloader;
|
||||
$this->filePath = $filePath;
|
||||
$this->dataPath = $dataPath;
|
||||
$this->pluginPath = $pluginPath;
|
||||
|
Reference in New Issue
Block a user