diff options
author | Necrodoom <doomed.war@gmail.com> | 2013-12-06 20:47:40 +0200 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-12-07 22:15:01 +0000 |
commit | 5e9f5904fde62440ae9adbe6bfea79e6ad66c6b6 (patch) | |
tree | 4a1763327dadc3bb6a1154f38950a968fb312131 /EssentialsChat | |
parent | 946051de7124ac0344df98b6c823b94613fe69ff (diff) | |
download | Essentials-5e9f5904fde62440ae9adbe6bfea79e6ad66c6b6.tar Essentials-5e9f5904fde62440ae9adbe6bfea79e6ad66c6b6.tar.gz Essentials-5e9f5904fde62440ae9adbe6bfea79e6ad66c6b6.tar.lz Essentials-5e9f5904fde62440ae9adbe6bfea79e6ad66c6b6.tar.xz Essentials-5e9f5904fde62440ae9adbe6bfea79e6ad66c6b6.zip |
Ignore empty chat events generated by plugins
Diffstat (limited to 'EssentialsChat')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java | 1 | ||||
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java index 959277b9c..db1d0066c 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java @@ -42,5 +42,4 @@ public class EssentialsChat extends JavaPlugin pluginManager.registerEvents(playerListenerHighest, this); } - } diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java index 0a1be2222..d9d259997 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java @@ -10,6 +10,7 @@ import org.bukkit.Server; import org.bukkit.event.Listener; import org.bukkit.event.player.AsyncPlayerChatEvent; + public abstract class EssentialsChatPlayer implements Listener { protected final static Logger logger = Logger.getLogger("Minecraft"); @@ -41,6 +42,11 @@ public abstract class EssentialsChatPlayer implements Listener public String getChatType(final String message) { + if (message.length() == 0) + { + //Ignore empty chat events generated by plugins + return ""; + } switch (message.charAt(0)) { case '!': |