mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 22:21:52 +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 not muted and has permission
|
||||||
if (!isMuted(player)) {
|
if (!isMuted(player)) {
|
||||||
|
|
||||||
if (isSpam(player)) {
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
|
||||||
|
if (isSpam(player)) {
|
||||||
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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user