mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Added /invisible command
This commit is contained in:
parent
a833d92d76
commit
0f4ce5a539
4 changed files with 40 additions and 2 deletions
|
|
@ -45,6 +45,26 @@ class ConsoleAPI{
|
|||
|
||||
public function defaultCommands($cmd, $params){
|
||||
switch($cmd){
|
||||
case "invisible":
|
||||
$p = strtolower(array_shift($params));
|
||||
switch($p){
|
||||
case "on":
|
||||
case "true":
|
||||
case "1":
|
||||
console("[INFO] Server is invisible");
|
||||
$this->server->api->setProperty("invisible", true);
|
||||
break;
|
||||
case "off":
|
||||
case "false":
|
||||
case "0":
|
||||
console("[INFO] Server is visible");
|
||||
$this->server->api->setProperty("invisible", false);
|
||||
break;
|
||||
default:
|
||||
console("[INFO] Usage: /invisible <on | off>");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "status":
|
||||
case "lag":
|
||||
$info = $this->server->debugInfo();
|
||||
|
|
@ -184,6 +204,7 @@ class ConsoleAPI{
|
|||
console("[INFO] /status: Show server TPS and memory usage");
|
||||
console("[INFO] /gamemode: Changes default gamemode");
|
||||
console("[INFO] /difficulty: Changes difficulty");
|
||||
console("[INFO] /invisible: Manages server visibility");
|
||||
console("[INFO] /say: Broadcasts mesages");
|
||||
console("[INFO] /save-all: Saves pending changes");
|
||||
console("[INFO] /whitelist: Manages whitelisting");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue