Removed some redundancy

This commit is contained in:
Jeremy Wood committed 2012-04-16 16:22:15 -04:00
1 parent 28991f3518
commit 58b94dc764
1 file changed
+2 -5
@@ -60,11 +60,11 @@ public class TownyChatPlayerListener implements Listener {
// if not muted and has permission // if not muted and has permission
if (!isMuted(player)) { if (!isMuted(player)) {
event.setCancelled(true);
if (isSpam(player)) { if (isSpam(player)) {
event.setCancelled(true);
return; return;
} }
event.setMessage(message);
// If no message toggle the chat mode. // If no message toggle the chat mode.
if (message.isEmpty()) { if (message.isEmpty()) {
@@ -76,10 +76,7 @@ public class TownyChatPlayerListener implements Listener {
} else { } else {
// Process the chat // Process the chat
channel.chatProcess(event); channel.chatProcess(event);
} }
event.setCancelled(true);
} }
} }
} }