mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
Fixed crash when a numeric world seed is set in pocketmine.yml
This commit is contained in:
parent
9bc8d8db79
commit
bc0434913e
@ -1654,7 +1654,7 @@ class Server{
|
|||||||
if($this->loadLevel($name) === false){
|
if($this->loadLevel($name) === false){
|
||||||
$options = $this->getProperty("worlds.$name");
|
$options = $this->getProperty("worlds.$name");
|
||||||
|
|
||||||
$seed = $this->getProperty($options["seed"], time());
|
$seed = $options["seed"] ?? time();
|
||||||
if(is_string($seed) and !is_numeric($seed)){
|
if(is_string($seed) and !is_numeric($seed)){
|
||||||
$seed = Utils::javaStringHash($seed);
|
$seed = Utils::javaStringHash($seed);
|
||||||
}elseif(!is_int($seed)){
|
}elseif(!is_int($seed)){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user