mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-02 14:38:57 +00:00
Removed some redundancy
This commit is contained in:
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 (!isMuted(player)) {
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
if (isSpam(player)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
event.setMessage(message);
|
||||
|
||||
// If no message toggle the chat mode.
|
||||
if (message.isEmpty()) {
|
||||
@@ -76,10 +76,7 @@ public class TownyChatPlayerListener implements Listener {
|
||||
} else {
|
||||
// Process the chat
|
||||
channel.chatProcess(event);
|
||||
|
||||
}
|
||||
event.setCancelled(true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user