mirror of
https://github.com/YouHaveTrouble/CommandWhitelist.git
synced 2026-05-11 22:16:57 +00:00
improved command execution check
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user