phar plugins should support multiple api versions

This commit is contained in:
GameHerobrine 2023-03-18 22:04:23 +03:00
parent c104951763
commit f933f4bec9
3 changed files with 6 additions and 3 deletions

View file

@ -148,7 +148,7 @@ class PluginAPI extends stdClass{
console("[INFO] Loading PHAR plugin \"".FORMAT_GREEN.$pluginInfo["name"].FORMAT_RESET."\" ".FORMAT_AQUA.$pluginInfo["version"].FORMAT_RESET." by ".FORMAT_AQUA.$pluginInfo["author"].FORMAT_RESET);
$aver = CURRENT_API_VERSION;
if($pluginInfo["api"] != $aver){
if(!in_array((string) CURRENT_API_VERSION, $pluginInfo["api"])){
console("[WARNING] API is not the same as Core, might cause bugs({$pluginInfo["api"]} != {$aver})");
}