Added a check to see if a user has a perm to bypass the audit.

master
Joey Hines 2018-09-25 13:36:11 -05:00
parent 56b6da012b
commit cae4925511
1 changed files with 3 additions and 1 deletions

View File

@ -34,6 +34,8 @@ public class CommandPreprocessListener implements Listener {
String command = event.getMessage(); String command = event.getMessage();
String base = command.split(" ")[0].substring(1).toLowerCase(); // Strip the slash String base = command.split(" ")[0].substring(1).toLowerCase(); // Strip the slash
String auditBypassPerm = "qol.audit.bypass." + base;
Player sender = event.getPlayer(); Player sender = event.getPlayer();
DynmapAPI dynmap = plugin.getDynmap(); DynmapAPI dynmap = plugin.getDynmap();
@ -77,7 +79,7 @@ public class CommandPreprocessListener implements Listener {
} }
// Command Auditing // Command Auditing
if (sender.hasPermission("qol.audit") && plugin.getConfig().getBoolean("audit.enabled")) { if (sender.hasPermission("qol.audit") && !sender.hasPermission(auditBypassPerm) && plugin.getConfig().getBoolean("audit.enabled")) {
boolean auditable = false; boolean auditable = false;
for (String audit : QoL.getAudits()) { for (String audit : QoL.getAudits()) {