mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 09:08:01 +01:00
Ignore empty chat events generated by plugins
This commit is contained in:
parent
946051de71
commit
5e9f5904fd
@ -42,5 +42,4 @@ public class EssentialsChat extends JavaPlugin
|
||||
pluginManager.registerEvents(playerListenerHighest, this);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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 '!':
|
||||
|
Loading…
Reference in New Issue
Block a user