mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 01:16:15 +00:00
Updated NBT library to remove read overhead
This commit is contained in:
@ -83,7 +83,7 @@ class Server{
|
||||
}
|
||||
}
|
||||
|
||||
function __construct($name, $gamemode = SURVIVAL, $seed = false, $port = 19132, $serverip = "0.0.0.0"){
|
||||
function __construct($name, $gamemode = 0, $seed = false, $port = 19132, $serverip = "0.0.0.0"){
|
||||
$this->port = (int) $port;
|
||||
$this->doTick = true;
|
||||
$this->gamemode = (int) $gamemode;
|
||||
@ -368,17 +368,18 @@ class Server{
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @return string
|
||||
*/
|
||||
public function getGamemode(){
|
||||
switch($this->gamemode){
|
||||
case SURVIVAL:
|
||||
case 0:
|
||||
return "survival";
|
||||
case CREATIVE:
|
||||
case 1:
|
||||
return "creative";
|
||||
case ADVENTURE:
|
||||
case 2:
|
||||
return "adventure";
|
||||
case VIEW:
|
||||
case 3:
|
||||
return "view";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user