From 3065e57b4427ffd36275c5f68613965600cd3a90 Mon Sep 17 00:00:00 2001 From: BenCodez Date: Sun, 6 Oct 2024 22:18:31 -0600 Subject: [PATCH] Add extra debug for vote shop permission checks --- .../votingplugin/commands/gui/player/VoteShop.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteShop.java b/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteShop.java index 4f8c90735..ce236a66d 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteShop.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/commands/gui/player/VoteShop.java @@ -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); } }