Fix flag perm check

This commit is contained in:
Jesse Boyd 2018-06-07 12:30:39 +10:00
parent 442513b592
commit 740de4932b
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -38,7 +38,7 @@ public class FlagCmd extends SubCommand {
if (MathMan.isInteger(value)) {
try {
int numeric = Integer.parseInt(value);
perm.substring(0, perm.length() - value.length() - 1);
perm = perm.substring(0, perm.length() - value.length() - 1);
int checkRange = PS.get().getPlatform().equalsIgnoreCase("bukkit") ? numeric : Settings.Limit.MAX_PLOTS;
return player.hasPermissionRange(perm, checkRange) >= numeric;