mirror of
https://github.com/songoda/EpicFarming.git
synced 2024-11-27 21:15:28 +01:00
Choose highest limit perm.
This commit is contained in:
parent
67e907be5c
commit
62917a0355
@ -58,7 +58,9 @@ public class BlockListeners implements Listener {
|
||||
int limit = -1;
|
||||
for (PermissionAttachmentInfo permissionAttachmentInfo : player.getEffectivePermissions()) {
|
||||
if (!permissionAttachmentInfo.getPermission().toLowerCase().startsWith("epicfarming.limit")) continue;
|
||||
limit = Integer.parseInt(permissionAttachmentInfo.getPermission().split("\\.")[2]);
|
||||
int num = Integer.parseInt(permissionAttachmentInfo.getPermission().split("\\.")[2]);
|
||||
if (num > limit)
|
||||
limit = num;
|
||||
}
|
||||
return limit;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user