mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Fixed invalid worlds property being set by users
This commit is contained in:
parent
0bc9a9bdab
commit
3abf36ad07
@ -299,7 +299,7 @@ class Server{
|
|||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getViewDistance(){
|
public function getViewDistance(){
|
||||||
return max(56, $this->getProperty("chunk-sending.max-chunks"));
|
return max(56, $this->getProperty("chunk-sending.max-chunks", 96));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -313,7 +313,7 @@ class Server{
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getServerName(){
|
public function getServerName(){
|
||||||
return $this->getConfigString("motd", "Unknown server");
|
return $this->getConfigString("motd", "Minecraft: PE Server");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1622,7 +1622,7 @@ class Server{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($this->getProperty("worlds", []) as $name => $worldSetting){
|
foreach((array) $this->getProperty("worlds", []) as $name => $worldSetting){
|
||||||
if($this->loadLevel($name) === false){
|
if($this->loadLevel($name) === false){
|
||||||
$seed = $this->getProperty("worlds.$name.seed", time());
|
$seed = $this->getProperty("worlds.$name.seed", time());
|
||||||
$options = explode(":", $this->getProperty("worlds.$name.generator", Generator::getGenerator("default")));
|
$options = explode(":", $this->getProperty("worlds.$name.generator", Generator::getGenerator("default")));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user