Removed audit rank

master
Joey Hines 2018-09-26 15:40:59 -05:00
parent 762346cf37
commit 0f42d6c320
1 changed files with 7 additions and 4 deletions

View File

@ -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<? extends Player> 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");
}
}