mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +00:00
Fixed exception thrown when plugins specify API version like 3.0 instead of 3.0.0
This could only be seen in a build with a non-suffixed API version, for example 3.0.0. When attempting to load plugins which specify API like 3.0 the server would raise errors.
This commit is contained in:
parent
6e8631347d
commit
506118e28f
@ -238,7 +238,7 @@ class PluginManager{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pluginNumbers = array_map("intval", explode(".", $pluginApi[0]));
|
$pluginNumbers = array_map("intval", array_pad(explode(".", $pluginApi[0]), 3, "0")); //plugins might specify API like "3.0" or "3"
|
||||||
$serverNumbers = array_map("intval", explode(".", $serverApi[0]));
|
$serverNumbers = array_map("intval", explode(".", $serverApi[0]));
|
||||||
|
|
||||||
if($pluginNumbers[0] !== $serverNumbers[0]){ //Completely different API version
|
if($pluginNumbers[0] !== $serverNumbers[0]){ //Completely different API version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user