Removed audit rank
parent
762346cf37
commit
0f42d6c320
|
@ -79,9 +79,10 @@ public class CommandPreprocessListener implements Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Command Auditing
|
// Command Auditing
|
||||||
if (sender.hasPermission("qol.audit") && plugin.getConfig().getBoolean("audit.enabled")) {
|
if (sender.hasPermission("qol.auditable") && plugin.getConfig().getBoolean("audit.enabled")) {
|
||||||
if (!sender.hasPermission("qol.auditor") && !targetIsAuditable(command)) {
|
if (sender.hasPermission("qol.auditor") && targetIsAuditable(command)) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
boolean auditable = false;
|
boolean auditable = false;
|
||||||
|
|
||||||
for (String audit : QoL.getAudits()) {
|
for (String audit : QoL.getAudits()) {
|
||||||
|
@ -123,8 +124,10 @@ public class CommandPreprocessListener implements Listener {
|
||||||
Collection<? extends Player> players = plugin.getServer().getOnlinePlayers();
|
Collection<? extends Player> players = plugin.getServer().getOnlinePlayers();
|
||||||
|
|
||||||
for (String param : commandSplit) {
|
for (String param : commandSplit) {
|
||||||
|
String lowerCaseParam = param.toLowerCase();
|
||||||
for (Player p : players) {
|
for (Player p : players) {
|
||||||
if (p.getName().toLowerCase().equals(param)) {
|
|
||||||
|
if (p.getName().toLowerCase().equals(lowerCaseParam)) {
|
||||||
return p.hasPermission("qol.auditable");
|
return p.hasPermission("qol.auditable");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue