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

@ -6,10 +6,11 @@
<classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/CameraAPI.jar"/> <classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/CameraAPI.jar"/>
<classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/simple-5.1.6.jar"/> <classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/simple-5.1.6.jar"/>
<classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/simple-xml.jar"/> <classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/simple-xml.jar"/>
<classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/bukkit-1.7.9-R0.3.jar"/> <classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/bukkit-1.7.9-R0.2.jar"/>
<classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/Vault-1.4.1.jar"/> <classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/PlotMe.jar"/>
<classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/worldguard-6.0.0-beta-02.jar"/> <classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/PlotSquared.jar"/>
<classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/PlotMe.jar"/> <classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/Vault-1.4.1.jar"/>
<classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/WorldEdit.jar"/> <classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/WorldEdit.jar"/>
<classpathentry kind="lib" path="C:/Users/Jesse Boyd/Desktop/plugins/plot_lib/lib/WorldGuard.jar"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

View File

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