Ignore empty chat events generated by plugins

This commit is contained in:
Necrodoom 2013-12-06 20:47:40 +02:00 committed by KHobbits
parent 946051de71
commit 5e9f5904fd
2 changed files with 6 additions and 1 deletions

View File

@ -42,5 +42,4 @@ public class EssentialsChat extends JavaPlugin
pluginManager.registerEvents(playerListenerHighest, this);
}
}

View File

@ -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 '!':