diff --git a/src/API/PluginAPI.php b/src/API/PluginAPI.php index 5376e0c2..4fff5b4d 100644 --- a/src/API/PluginAPI.php +++ b/src/API/PluginAPI.php @@ -84,8 +84,11 @@ class PluginAPI extends stdClass{ console("[ERROR] [PluginAPI] Failed loading plugin: evaluation error"); } $className = trim($info["class"]); + if(!isset($info["apiversion"]) or intval($info["apiversion"]) < CURRENT_API_VERSION){ + console("[ERROR] [PluginAPI] Plugin \"".$info["name"]."\" uses an outdated API! It can crash or corrupt the server!"); + } if(isset($info["api"]) and $info["api"] !== true){ - console("[NOTICE] [PluginAPI] Plugin \"\x1b[36m".$info["name"]."\x1b[0m\" got raw access to Server methods"); + 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)){ diff --git a/src/common/config.php b/src/common/config.php index 3a07ed05..26a69af6 100644 --- a/src/common/config.php +++ b/src/common/config.php @@ -42,4 +42,5 @@ define("MAJOR_VERSION", "Alpha_1.2dev"); define("CURRENT_STRUCTURE", 5); define("CURRENT_PROTOCOL", 9); define("CURRENT_MINECRAFT_VERSION", "v0.6.1 alpha"); +define("CURRENT_API_VERSION", 1); define("CURRENT_PHP_VERSION", "5.4.11"); \ No newline at end of file