Log notice when chat ignore is blocked by another plugin.

This commit is contained in:
KHobbits 2013-07-17 23:26:26 +01:00
parent e8d9951ee8
commit 4483ff40b4
2 changed files with 44 additions and 28 deletions

View file

@ -69,6 +69,8 @@ public class EssentialsPlayerListener implements Listener
user.sendMessage(_("voiceSilenced"));
LOGGER.info(_("mutedUserSpeaks", user.getName()));
}
try
{
final Iterator<Player> it = event.getRecipients().iterator();
while (it.hasNext())
{
@ -78,6 +80,19 @@ public class EssentialsPlayerListener implements Listener
it.remove();
}
}
}
catch (UnsupportedOperationException ex)
{
if (ess.getSettings().isDebug())
{
ess.getLogger().log(Level.INFO, "Ignore could not block chat due to custom chat plugin event.", ex);
}
else
{
ess.getLogger().info("Ignore could not block chat due to custom chat plugin event.");
}
}
user.updateActivity(true);
user.setDisplayNick();
}

View file

@ -9,6 +9,7 @@ import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import net.ess3.api.events.LocalChatSpyEvent;
import org.bukkit.Location;
import org.bukkit.Server;
@ -93,7 +94,7 @@ public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer
{
if (ess.getSettings().isDebug())
{
ess.getLogger().info("Plugin triggered custom chat event, local chat handling aborted.");
ess.getLogger().log(Level.INFO, "Plugin triggered custom chat event, local chat handling aborted.", ex);
}
return;
}