Moving files

This commit is contained in:
Shoghi Cervantes Pueyo
2013-01-13 11:31:53 +01:00
parent 6d90249fbd
commit dff26611e5
41 changed files with 44 additions and 55 deletions

View File

@@ -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!!
}
}
}

View File

@@ -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!!!
}
}