fix: account for false permissions when checking range (#4014)

This commit is contained in:
Jordan 2023-04-21 23:24:14 +01:00 committed by GitHub
parent 2d1f483469
commit 1a712ad3c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,6 +176,10 @@ public class BukkitPlayer extends PlotPlayer<Player> {
final Set<PermissionAttachmentInfo> effective = player.getEffectivePermissions(); final Set<PermissionAttachmentInfo> effective = player.getEffectivePermissions();
if (!effective.isEmpty()) { if (!effective.isEmpty()) {
for (PermissionAttachmentInfo attach : effective) { for (PermissionAttachmentInfo attach : effective) {
// Ignore all "false" permissions
if (!attach.getValue()) {
continue;
}
String permStr = attach.getPermission(); String permStr = attach.getPermission();
if (permStr.startsWith(stubPlus)) { if (permStr.startsWith(stubPlus)) {
hasAny = true; hasAny = true;