diff --git a/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java b/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java index 110ec9c..f5b2fca 100644 --- a/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java @@ -79,9 +79,10 @@ public class CommandPreprocessListener implements Listener { } // Command Auditing - if (sender.hasPermission("qol.audit") && plugin.getConfig().getBoolean("audit.enabled")) { - if (!sender.hasPermission("qol.auditor") && !targetIsAuditable(command)) { - + if (sender.hasPermission("qol.auditable") && plugin.getConfig().getBoolean("audit.enabled")) { + if (sender.hasPermission("qol.auditor") && targetIsAuditable(command)) { + return; + } else { boolean auditable = false; for (String audit : QoL.getAudits()) { @@ -123,8 +124,10 @@ public class CommandPreprocessListener implements Listener { Collection players = plugin.getServer().getOnlinePlayers(); for (String param : commandSplit) { + String lowerCaseParam = param.toLowerCase(); for (Player p : players) { - if (p.getName().toLowerCase().equals(param)) { + + if (p.getName().toLowerCase().equals(lowerCaseParam)) { return p.hasPermission("qol.auditable"); } }