mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 08:36:45 +01:00
Now when using say its customized, soon to be customizable
This commit is contained in:
parent
4249685208
commit
5cc636f269
@ -1,19 +0,0 @@
|
||||
public class vConsole extends PluginListener {
|
||||
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;
|
||||
}
|
||||
}
|
@ -6,24 +6,21 @@ import java.util.logging.Logger;
|
||||
//Author: nossr50, TrapAlice, cerevisiae
|
||||
//=====================================================================
|
||||
public class vListener extends PluginListener {
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
//On console stuff
|
||||
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
|
||||
String server = Colors.LightGreen + "[Server]" + Colors.DarkPurple;
|
||||
if(split[0].equalsIgnoreCase("say"))
|
||||
{
|
||||
//Send out the message
|
||||
if(split.length > 1){
|
||||
String args = " " + etc.combineSplit(1, split, " ");
|
||||
vChat.gmsg(server + args);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
log.log(Level.INFO, split.toString());
|
||||
if(split[0].equalsIgnoreCase("stop"))
|
||||
vChat.gmsg(server + "shutting down the server");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user