2011-01-08 06:43:08 +01:00
|
|
|
public class vConsole extends PluginListener {
|
2011-01-08 06:34:42 +01:00
|
|
|
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.
|
2011-01-08 06:43:08 +01:00
|
|
|
String server = Colors.LightGreen + "[Server] " + Colors.DarkPurple;
|
2011-01-08 06:34:42 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|