mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Added a fix so higher PMF version files doesn't get loaded
This commit is contained in:
parent
ad6b48a599
commit
074c1b5295
@ -106,6 +106,9 @@ class PMFLevel extends PMF{
|
||||
}
|
||||
$this->seek(5);
|
||||
$this->levelData["version"] = ord($this->read(1));
|
||||
if($this->levelData["version"] > PMF_CURRENT_LEVEL_VERSION){
|
||||
return false;
|
||||
}
|
||||
$this->levelData["name"] = $this->read(Utils::readShort($this->read(2), false));
|
||||
$this->levelData["seed"] = Utils::readInt($this->read(4));
|
||||
$this->levelData["time"] = Utils::readInt($this->read(4));
|
||||
|
@ -49,6 +49,9 @@ class PMFPlugin extends PMF{
|
||||
}
|
||||
$this->seek(5);
|
||||
$this->pluginData["fversion"] = ord($this->read(1));
|
||||
if($this->pluginData["fversion"] > PMF_CURRENT_PLUGIN_VERSION){
|
||||
return false;
|
||||
}
|
||||
$this->pluginData["name"] = $this->read(Utils::readShort($this->read(2), false));
|
||||
$this->pluginData["version"] = $this->read(Utils::readShort($this->read(2), false));
|
||||
$this->pluginData["author"] = $this->read(Utils::readShort($this->read(2), false));
|
||||
|
Loading…
x
Reference in New Issue
Block a user