forked from Minecraft/QoL
Added a check to see if a user has a perm to bypass the audit.
parent
56b6da012b
commit
cae4925511
|
@ -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()) {
|
||||||
|
|
Loading…
Reference in New Issue