1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-07-31 20:00:47 +02:00

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 a7a42a3956
commit de0277b1a7
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 '!':