From 62cae27219e229263ec47d8918053a9553d99402 Mon Sep 17 00:00:00 2001 From: kangarko Date: Wed, 17 Feb 2021 14:00:49 +0100 Subject: [PATCH] Formatting --- pom.xml | 2 +- .../org/mineacademy/chatcontrol/listener/ChatListener.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index eb6ba26..61ff2de 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.spigotmc spigot-api - 1.16.3-R0.1-SNAPSHOT + 1.16.5-R0.1-SNAPSHOT diff --git a/src/main/java/org/mineacademy/chatcontrol/listener/ChatListener.java b/src/main/java/org/mineacademy/chatcontrol/listener/ChatListener.java index d2b023f..9782b29 100644 --- a/src/main/java/org/mineacademy/chatcontrol/listener/ChatListener.java +++ b/src/main/java/org/mineacademy/chatcontrol/listener/ChatListener.java @@ -54,7 +54,8 @@ private void onPlayerChat(CompatPlayerChatEvent e) { return; } - timeCheck: { + timeCheck: + { final long now = System.currentTimeMillis() / 1000L; final int messageDelay = Settings.AntiSpam.Messages.DELAY.getFor(plData); @@ -72,7 +73,8 @@ private void onPlayerChat(CompatPlayerChatEvent e) { plData.lastMessageTime = now; } - dupeCheck: if (Settings.AntiSpam.Messages.SIMILARITY > 0 && Settings.AntiSpam.Messages.SIMILARITY < 100) { + dupeCheck: + if (Settings.AntiSpam.Messages.SIMILARITY > 0 && Settings.AntiSpam.Messages.SIMILARITY < 100) { if (Common.hasPerm(pl, Permissions.Bypasses.SIMILAR_CHAT) || isWhitelisted(message, Settings.AntiSpam.Messages.WHITELIST_SIMILARITY)) break dupeCheck; @@ -140,6 +142,7 @@ private void onPlayerChat(CompatPlayerChatEvent e) { if (!Common.hasPerm(pl, Permissions.Bypasses.CAPITALIZE)) message = Common.capitalize(message); + if (!Common.hasPerm(pl, Permissions.Bypasses.PUNCTUATE)) message = Common.insertDot(message);