Skip to content

Commit a196409

Browse files
committed
Merge branch 'master' into 1.16
2 parents 852e8f4 + 595154a commit a196409

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/fibermc/essentialcommands/ECPerms.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ static int getHighestNumericPermission(@NotNull CommandSource source, @NotNull S
111111
if (isSuperAdmin(source)) {
112112
return Integer.MAX_VALUE;
113113
}
114+
115+
// If ONLY -1 is present as possibility, treat as no effective limit.
116+
if (permissionGroup.length == 1 && getNumericValue(permissionGroup[0]) == -1) {
117+
return Integer.MAX_VALUE;
118+
}
119+
114120
// If permissions API is disabled, min int value in permission group is used for all non-op players.
115121
if (!Config.USE_PERMISSIONS_API) {
116122
return Arrays.stream(permissionGroup).mapToInt(ECPerms::getNumericValue).min().getAsInt();

0 commit comments

Comments
 (0)