Removed constant property file write

This commit is contained in:
Shoghi Cervantes Pueyo 2013-04-09 17:39:36 +02:00
parent 7e37a60a67
commit 2043534003
2 changed files with 4 additions and 8 deletions

View File

@ -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"));
self::$serverRequest = $this->server;
$this->setProperty("server-id", $this->server->serverID);
if($this->getProperty("server-id") != $this->server->serverID){
$this->setProperty("server-id", $this->server->serverID);
}
$this->server->api = $this;
$gitsha1 = false;
if(file_exists(FILE_PATH.".git/refs/heads/master")){ //Found Git information!
@ -205,7 +207,7 @@ class ServerAPI{
$this->gen->generate();
$this->gen->save($this->server->mapDir, $this->server->mapName);
$this->setProperty("level-name", $this->server->mapName);
$this->setProperty("gamemode", 1);
$this->setProperty("gamemode", CREATIVE);
}
$this->loadProperties();
$this->server->loadMap();

View File

@ -346,12 +346,6 @@ class Utils{
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(){
return microtime(true);
}