Some fixes.

This commit is contained in:
kotyara 2022-07-26 18:11:27 +05:00
parent b60f0877e1
commit 51e77bf77e
8 changed files with 22 additions and 17 deletions

View file

@ -191,7 +191,7 @@ class ConsoleAPI{
"spectator" => VIEW,
"v" => VIEW,
];
if(!isset($gms[strtolower($params[0])])){
if(!isset($params[0]) or !isset($gms[strtolower($params[0])])){
$output .= "Usage: /$cmd <mode>\n";
break;
}
@ -205,9 +205,6 @@ class ConsoleAPI{
$info = $this->server->debugInfo();
$output .= "TPS: " . $info["tps"] . ", Memory usage: " . $info["memory_usage"] . " (Peak " . $info["memory_peak_usage"] . ")\n";
break;
case "update-done":
$this->server->api->setProperty("last-update", time());
break;
case "stop":
$this->loop->stop = true;
$output .= "Stopping the server\n";