sendMessage now supports console

This commit is contained in:
Jesse Boyd
2014-10-18 10:22:08 -07:00
parent eee4a44fcb
commit 2435eab96a
2 changed files with 18 additions and 5 deletions

View File

@ -252,6 +252,12 @@ public class PlayerFunctions {
if ((msg.length() == 0) || msg.equalsIgnoreCase("")) {
return;
}
if (plr==null) {
PlotMain.sendConsoleSenderMessage(C.PREFIX.s() + msg);
return;
}
sendMessageWrapped(plr, ChatColor.translateAlternateColorCodes('&', C.PREFIX.s() + msg));
}
@ -264,6 +270,12 @@ public class PlayerFunctions {
* Caption to send
*/
public static void sendMessage(Player plr, C c, String... args) {
if (plr==null) {
PlotMain.sendConsoleSenderMessage(c);
return;
}
if (c.s().length() < 1) {
return;
}