improved command execution check

This commit is contained in:
youhavetrouble
2020-07-22 19:44:55 +02:00
parent 733b556166
commit 687fd0867b
@@ -26,7 +26,9 @@ public class PlayerCommandPreProcess implements Listener {
if (player.hasPermission("commandwhitelist.commands." + s.getKey())) { if (player.hasPermission("commandwhitelist.commands." + s.getKey())) {
for (String comm : s.getValue()) { for (String comm : s.getValue()) {
comm = comm.toLowerCase(); comm = comm.toLowerCase();
if (command.startsWith("/" + comm)) { if (command.equalsIgnoreCase("/"+comm))
return;
else if (command.startsWith("/" + comm + " ")) {
return; return;
} }
} }