mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 23:37:45 +00:00
Moving files
This commit is contained in:
@@ -26,11 +26,10 @@ the Free Software Foundation, either version 3 of the License, or
|
||||
*/
|
||||
|
||||
class PluginAPI extends stdClass{
|
||||
private $server, $plugins;
|
||||
private $server
|
||||
private $plugins = array();
|
||||
public function __construct(PocketMinecraftServer $server){
|
||||
$this->server = $server;
|
||||
$this->plugins = array();
|
||||
require_once("classes/Spyc.class.php"); //YAML parser
|
||||
}
|
||||
|
||||
public function getList(){
|
||||
@@ -164,9 +163,7 @@ class PluginAPI extends stdClass{
|
||||
}
|
||||
}
|
||||
foreach($this->plugins as $p){
|
||||
if(method_exists($p[0], "init")){
|
||||
$p[0]->init();
|
||||
}
|
||||
$p[0]->init(); //ARGHHH!!! Plugin loading randomly fails!!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,9 @@ the Free Software Foundation, either version 3 of the License, or
|
||||
|
||||
class ServerAPI{
|
||||
var $restart = false;
|
||||
private $server, $config, $apiList = array();
|
||||
private $server
|
||||
private $config
|
||||
private $apiList = array();
|
||||
|
||||
public function run(){
|
||||
$this->load();
|
||||
@@ -204,7 +206,7 @@ class ServerAPI{
|
||||
}
|
||||
foreach($this->apiList as $ob){
|
||||
if(is_callable(array($ob, "init"))){
|
||||
$ob->init();
|
||||
$ob->init(); //Fails sometimes!!!
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user