Prevent people from locking themselves out of using commands to go unafk after having done just / (all commands start with / after all)

This commit is contained in:
Teriuihi 2023-04-10 03:41:53 +02:00
parent ac9cfc1b67
commit 46e763500f

View File

@ -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;
}