Skip to content

Commit

Permalink
Add extra debug for vote shop permission checks
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Oct 7, 2024
1 parent fdcf092 commit 3065e57
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,17 @@ public void onChest(Player player) {
if (perm.isEmpty()) {
hasPerm = true;
} else {
String p = "";
if (perm.startsWith("!")) {
hasPerm = !player.hasPermission(PlaceholderUtils.replacePlaceHolders(player, perm.substring(1)));
p = PlaceholderUtils.replacePlaceHolders(player, perm.substring(1));
hasPerm = !player.hasPermission(p);
} else {
hasPerm = player.hasPermission(PlaceholderUtils.replacePlaceHolders(player, perm));
p = PlaceholderUtils.replacePlaceHolders(player, perm);
hasPerm = player.hasPermission(p);
}
if (!hasPerm) {
plugin.extraDebug("VoteShop: " + player.getName() + "/" + player.getUniqueId()
+ " does not have permission `" + p + "` for " + identifier);
}
}

Expand Down

0 comments on commit 3065e57

Please sign in to comment.