mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-16 16:34:05 +00:00
Removed constant property file write
This commit is contained in:
parent
7e37a60a67
commit
2043534003
@ -125,7 +125,9 @@ class ServerAPI{
|
|||||||
}
|
}
|
||||||
$this->server = new PocketMinecraftServer($this->getProperty("server-name"), $this->getProperty("gamemode"), false, $this->getProperty("server-port"), $this->getProperty("server-id"), $this->getProperty("server-ip"));
|
$this->server = new PocketMinecraftServer($this->getProperty("server-name"), $this->getProperty("gamemode"), false, $this->getProperty("server-port"), $this->getProperty("server-id"), $this->getProperty("server-ip"));
|
||||||
self::$serverRequest = $this->server;
|
self::$serverRequest = $this->server;
|
||||||
|
if($this->getProperty("server-id") != $this->server->serverID){
|
||||||
$this->setProperty("server-id", $this->server->serverID);
|
$this->setProperty("server-id", $this->server->serverID);
|
||||||
|
}
|
||||||
$this->server->api = $this;
|
$this->server->api = $this;
|
||||||
$gitsha1 = false;
|
$gitsha1 = false;
|
||||||
if(file_exists(FILE_PATH.".git/refs/heads/master")){ //Found Git information!
|
if(file_exists(FILE_PATH.".git/refs/heads/master")){ //Found Git information!
|
||||||
@ -205,7 +207,7 @@ class ServerAPI{
|
|||||||
$this->gen->generate();
|
$this->gen->generate();
|
||||||
$this->gen->save($this->server->mapDir, $this->server->mapName);
|
$this->gen->save($this->server->mapDir, $this->server->mapName);
|
||||||
$this->setProperty("level-name", $this->server->mapName);
|
$this->setProperty("level-name", $this->server->mapName);
|
||||||
$this->setProperty("gamemode", 1);
|
$this->setProperty("gamemode", CREATIVE);
|
||||||
}
|
}
|
||||||
$this->loadProperties();
|
$this->loadProperties();
|
||||||
$this->server->loadMap();
|
$this->server->loadMap();
|
||||||
|
@ -346,12 +346,6 @@ class Utils{
|
|||||||
return array("yaw" => $hAngle, "pitch" => $vAngle);
|
return array("yaw" => $hAngle, "pitch" => $vAngle);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*public static function sha1($input){
|
|
||||||
$number = new Math_BigInteger(sha1($input, true), -256);
|
|
||||||
$zero = new Math_BigInteger(0);
|
|
||||||
return ($zero->compare($number) <= 0 ? "":"-") . ltrim($number->toHex(), "0");
|
|
||||||
}*/
|
|
||||||
|
|
||||||
public static function microtime(){
|
public static function microtime(){
|
||||||
return microtime(true);
|
return microtime(true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user