From 1a712ad3c1cba5fcf10ce134f34bfe3e24c3df7c Mon Sep 17 00:00:00 2001 From: Jordan Date: Fri, 21 Apr 2023 23:24:14 +0100 Subject: [PATCH] fix: account for false permissions when checking range (#4014) --- .../main/java/com/plotsquared/bukkit/player/BukkitPlayer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java b/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java index 04c41d701..d86d48c7d 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java @@ -176,6 +176,10 @@ public class BukkitPlayer extends PlotPlayer { final Set effective = player.getEffectivePermissions(); if (!effective.isEmpty()) { for (PermissionAttachmentInfo attach : effective) { + // Ignore all "false" permissions + if (!attach.getValue()) { + continue; + } String permStr = attach.getPermission(); if (permStr.startsWith(stubPlus)) { hasAny = true;