Match full command instead of just the base to avoid issues like party chat or /r not cancelling afk if they're not duplicates
This commit is contained in:
parent
3798cf5e7e
commit
ac9cfc1b67
|
|
@ -186,12 +186,8 @@ public class AFKDetector extends JavaPlugin implements Listener {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] s = event.getMessage().toLowerCase().split(" ");
|
|
||||||
if (s.length == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
UUID uuid = event.getPlayer().getUniqueId();
|
UUID uuid = event.getPlayer().getUniqueId();
|
||||||
String command = s[0];
|
String command = event.getMessage().toLowerCase();
|
||||||
|
|
||||||
if (commandHistory.checkForMatch(uuid, command)) {
|
if (commandHistory.checkForMatch(uuid, command)) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user