This commit is contained in:
Shoghi Cervantes 2013-06-08 19:27:18 +02:00
parent 1014052a57
commit 715b92b681

View File

@ -40,7 +40,7 @@ class ConsoleAPI{
$this->loop = new ConsoleLoop(); $this->loop = new ConsoleLoop();
$this->register("help", "[page|command name]", array($this, "defaultCommands")); $this->register("help", "[page|command name]", array($this, "defaultCommands"));
$this->register("status", "", array($this, "defaultCommands")); $this->register("status", "", array($this, "defaultCommands"));
$this->register("difficulty", "<0|1|2>", array($this, "defaultCommands")); $this->register("difficulty", "<0|1|2|3>", array($this, "defaultCommands"));
$this->register("stop", "", array($this, "defaultCommands")); $this->register("stop", "", array($this, "defaultCommands"));
$this->register("defaultgamemode", "<mode>", array($this, "defaultCommands")); $this->register("defaultgamemode", "<mode>", array($this, "defaultCommands"));
$this->server->api->ban->cmdWhitelist("help"); $this->server->api->ban->cmdWhitelist("help");
@ -98,7 +98,7 @@ class ConsoleAPI{
case "difficulty": case "difficulty":
$s = trim(array_shift($params)); $s = trim(array_shift($params));
if($s == "" or (((int) $s) !== 0 and ((int) $s) !== 1)){ if($s == "" or (((int) $s) !== 0 and ((int) $s) !== 1)){
$output .= "Usage: /difficulty <0|1>\n"; $output .= "Usage: /difficulty <0|1|2|3>\n";
break; break;
} }
$this->server->api->setProperty("difficulty", (int) $s); $this->server->api->setProperty("difficulty", (int) $s);