Check if the Plugin uses the Plugin Interface

This commit is contained in:
Shoghi Cervantes Pueyo 2012-12-26 13:38:54 +01:00
parent 987a6e635e
commit 145d0707e6

View File

@ -89,6 +89,9 @@ class PluginAPI extends stdClass{
console("[NOTICE] [PluginAPI] Plugin \"".$info["name"]."\" 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)){
console("[NOTICE] [PluginAPI] Plugin \"".$info["name"]."\" doesn't use the Plugin Interface");
}
$this->plugins[$className] = array($object, $info);
}