This commit is contained in:
GameHerobrine 2022-07-23 02:31:28 +03:00
parent ce25cfbbc0
commit 34287bb101
2 changed files with 11 additions and 20 deletions

View file

@ -28,8 +28,7 @@ class ServerAPI{
private $apiList = array();
private $asyncCnt = 0;
private $rcon;
public $query;
public $queryAPI;
//TODO: Instead of hard-coding functions, use PHPDoc-compatible methods to load APIs.
@ -174,7 +173,7 @@ class ServerAPI{
$this->loadAPI("tile", "TileAPI");
$this->loadAPI("player", "PlayerAPI");
$this->loadAPI("time", "TimeAPI");
$this->loadAPI("queryAPI", "QueryAPI");
foreach($this->apiList as $ob){
if(is_callable(array($ob, "init"))){
$ob->init(); //Fails sometimes!!!
@ -182,6 +181,7 @@ class ServerAPI{
}
$this->loadAPI("plugin", "PluginAPI"); //fix :(
$this->plugin->init();
}
public function async(callable $callable, $params = array(), $remove = false){