mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
fix: more intuitive limit permissions (#2233)
- immediately return limit if unlimited (limit combination take the "higher" value) - add fawe.limit.unlimited permission and it's an intuitive permission to give
This commit is contained in:
parent
3a13c4aaa7
commit
1b0fb9ed48
@ -102,11 +102,10 @@ public class Settings extends Config {
|
||||
|
||||
public FaweLimit getLimit(Actor actor) {
|
||||
FaweLimit limit;
|
||||
if (actor.hasPermission("fawe.limit.*") || actor.hasPermission("fawe.bypass")) {
|
||||
limit = FaweLimit.MAX.copy();
|
||||
} else {
|
||||
limit = new FaweLimit();
|
||||
if (actor.hasPermission("fawe.bypass") || actor.hasPermission("fawe.limit.unlimited")) {
|
||||
return FaweLimit.MAX.copy();
|
||||
}
|
||||
limit = new FaweLimit();
|
||||
ArrayList<String> keys = new ArrayList<>(LIMITS.getSections());
|
||||
if (keys.remove("default")) {
|
||||
keys.add("default");
|
||||
|
Loading…
Reference in New Issue
Block a user