mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
Removed Server getting via Plugin Loading
This commit is contained in:
parent
1bfef261ab
commit
d46a61d0c4
1 changed files with 1 additions and 4 deletions
|
|
@ -92,10 +92,7 @@ class PluginAPI extends stdClass{
|
||||||
}elseif(!isset($info["apiversion"]) or intval($info["apiversion"]) < CURRENT_API_VERSION){
|
}elseif(!isset($info["apiversion"]) or intval($info["apiversion"]) < CURRENT_API_VERSION){
|
||||||
console("[NOTICE] [PluginAPI] Plugin \"".$info["name"]."\" uses an old API");
|
console("[NOTICE] [PluginAPI] Plugin \"".$info["name"]."\" uses an old API");
|
||||||
}
|
}
|
||||||
if(isset($info["api"]) and $info["api"] !== true){
|
$object = new $className($this->server->api, false);
|
||||||
console("[INFO] [PluginAPI] Plugin \"\x1b[36m".$info["name"]."\x1b[0m\" got raw access to Server methods");
|
|
||||||
}
|
|
||||||
$object = new $className($this->server->api, ((isset($info["api"]) and $info["api"] !== true) ? $this->server:false));
|
|
||||||
if(!($object instanceof Plugin)){
|
if(!($object instanceof Plugin)){
|
||||||
console("[ERROR] [PluginAPI] Plugin \"\x1b[36m".$info["name"]."\x1b[0m\" doesn't use the Plugin Interface");
|
console("[ERROR] [PluginAPI] Plugin \"\x1b[36m".$info["name"]."\x1b[0m\" doesn't use the Plugin Interface");
|
||||||
if(method_exists($object, "__destruct")){
|
if(method_exists($object, "__destruct")){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue