1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-19 10:22:58 +01:00

Added some barebones console interaction

This commit is contained in:
nossr50
2011-01-07 21:34:42 -08:00
parent 098d5942aa
commit 44e172369f
2 changed files with 21 additions and 0 deletions

19
vConsole.java Normal file
View File

@@ -0,0 +1,19 @@
public class vConsole {
public boolean onConsoleCommand(String[] split) {
String args = etc.combineSplit(1, split, "");
//Return true if you don't want the server command to be parsed by the server.
String server = Colors.LightGreen + "[Server]" + Colors.DarkPurple;
if(split[0].equalsIgnoreCase("stop")){
vChat.gmsg(server + "Rebooting the server");
return false;
}
//Make say nicer
if(split[0].equalsIgnoreCase("say"))
{
//Send out the message
vChat.gmsg(server + args);
return true;
}
return false;
}
}