From f241b4acfe4c5a8ee703b1bbccb540d4622fa706 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 17 Mar 2023 18:46:49 +0000 Subject: [PATCH] fix: account for false permissions when checking range - Fixes #3905 --- .../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;