From d83161f3a8759ce5fb41bbe3531308d639c12f0f Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sat, 15 Oct 2022 19:56:41 +0300 Subject: [PATCH] api warning --- src/API/PluginAPI.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/API/PluginAPI.php b/src/API/PluginAPI.php index 2aaac142..afb5edeb 100644 --- a/src/API/PluginAPI.php +++ b/src/API/PluginAPI.php @@ -157,6 +157,11 @@ class PluginAPI extends stdClass{ console("[INFO] Loading {$pluginInfo["name"]} by {$pluginInfo["author"]}..."); console("[WARNING] PHAR Plugin format is experemental and might cause bugs."); + $aver = CURRENT_API_VERSION; + if($pluginInfo["api"] != $aver){ + console("[WARNING] API is not the same as Core, might cause bugs({$pluginInfo["api"]} != {$aver})"); + } + $phr = "phar://$filePath/"; include($phr."/src/".$pluginInfo["classLoader"]); $class = $pluginInfo["CLClass"]; @@ -267,6 +272,7 @@ class PluginAPI extends stdClass{ $names[] = $p[1]["name"]; $versions[] = $p[1]["version"]; } + foreach($this->plugins as $p){ if($p[0] instanceof OtherPluginRequirement){ foreach($p[0]->getRequiredPlugins() as $required){