From 46e763500fe7dea4ead2130107601452898a7ecd Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Mon, 10 Apr 2023 03:41:53 +0200 Subject: [PATCH] Prevent people from locking themselves out of using commands to go unafk after having done just / (all commands start with / after all) --- src/main/java/com/alttd/afkdectector/AFKDetector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/alttd/afkdectector/AFKDetector.java b/src/main/java/com/alttd/afkdectector/AFKDetector.java index fce8f61..c4cb014 100755 --- a/src/main/java/com/alttd/afkdectector/AFKDetector.java +++ b/src/main/java/com/alttd/afkdectector/AFKDetector.java @@ -189,7 +189,7 @@ public class AFKDetector extends JavaPlugin implements Listener { UUID uuid = event.getPlayer().getUniqueId(); String command = event.getMessage().toLowerCase(); - if (commandHistory.checkForMatch(uuid, command)) { + if (command.length() <= 1 || commandHistory.checkForMatch(uuid, command)) { return; }