mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Fix: permission check for integer flags (#4217)
* Changing numeric check to support '0' * Adding notes * More detailed description of 'max-plots' setting
This commit is contained in:
@ -158,6 +158,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
}
|
||||
final String[] nodes = stub.split("\\.");
|
||||
final StringBuilder n = new StringBuilder();
|
||||
// Wildcard check from less specific permission to more specific permission
|
||||
for (int i = 0; i < (nodes.length - 1); i++) {
|
||||
n.append(nodes[i]).append(".");
|
||||
if (!stub.equals(n + Permission.PERMISSION_STAR.toString())) {
|
||||
@ -166,9 +167,11 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Wildcard check for the full permission
|
||||
if (hasPermission(stub + ".*")) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
// Permission value cache for iterative check
|
||||
int max = 0;
|
||||
if (CHECK_EFFECTIVE) {
|
||||
boolean hasAny = false;
|
||||
|
Reference in New Issue
Block a user