From 1b0fb9ed482a5e72f1248b57d35861c4c48232a5 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sat, 20 May 2023 19:32:38 +0100 Subject: [PATCH] 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 --- .../fastasyncworldedit/core/configuration/Settings.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java index 44e211461..50b515257 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java @@ -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 keys = new ArrayList<>(LIMITS.getSections()); if (keys.remove("default")) { keys.add("default");