mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-26 21:03:45 +00:00
Updated flat preset, do not allow empty Level names
This commit is contained in:
parent
bb9067acd7
commit
a7a45dfe96
@ -108,6 +108,9 @@ class LevelAPI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function levelExists($name){
|
public function levelExists($name){
|
||||||
|
if($name === ""){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$path = DATA_PATH."worlds/".$name."/";
|
$path = DATA_PATH."worlds/".$name."/";
|
||||||
if($this->get($name) === false and !file_exists($path."level.pmf")){
|
if($this->get($name) === false and !file_exists($path."level.pmf")){
|
||||||
$level = new LevelImport($path);
|
$level = new LevelImport($path);
|
||||||
|
@ -324,8 +324,8 @@ class PocketMinecraftServer{
|
|||||||
public function tick(){
|
public function tick(){
|
||||||
$time = microtime(true);
|
$time = microtime(true);
|
||||||
if($this->lastTick <= ($time - 0.05)){
|
if($this->lastTick <= ($time - 0.05)){
|
||||||
unset($this->tickMeasure[key($this->tickMeasure)]);
|
|
||||||
$this->tickMeasure[] = $this->lastTick = $time;
|
$this->tickMeasure[] = $this->lastTick = $time;
|
||||||
|
unset($this->tickMeasure[key($this->tickMeasure)]);
|
||||||
$this->tickerFunction($time);
|
$this->tickerFunction($time);
|
||||||
$this->trigger("server.tick", $time);
|
$this->trigger("server.tick", $time);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ class SuperflatGenerator implements LevelGenerator{
|
|||||||
private $level, $random, $structure, $chunks, $options, $floorLevel;
|
private $level, $random, $structure, $chunks, $options, $floorLevel;
|
||||||
|
|
||||||
public function __construct(array $options = array()){
|
public function __construct(array $options = array()){
|
||||||
$this->preset = "2;7,2x3,2;1;spawn(radius=10 block=24)";
|
$this->preset = "2;7,59x1,3x3,2;1;spawn(radius=10 block=89),trees";
|
||||||
$this->options = $options;
|
$this->options = $options;
|
||||||
if(isset($options["preset"])){
|
if(isset($options["preset"])){
|
||||||
$this->parsePreset($options["preset"]);
|
$this->parsePreset($options["preset"]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user