From f7e94fd450ad764f85fa9db3d7e6e2cec226c50f Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Mon, 25 Oct 2021 14:12:36 +0100 Subject: [PATCH] Only add backupregions if whitelisting --- .../com/fastasyncworldedit/core/util/WEManager.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java index cdef52b04..1aab4c83f 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java @@ -147,11 +147,13 @@ public class WEManager { player.printError(TextComponent.of("Missing permission " + "fawe." + manager.getKey())); } } - regions.addAll(backupRegions); - if (!masks.isEmpty() && isWhitelist) { - player.setMeta("lastMask", masks); - } else if (isWhitelist) { - player.deleteMeta("lastMask"); + if (isWhitelist) { + regions.addAll(backupRegions); + if (!masks.isEmpty()) { + player.setMeta("lastMask", masks); + } else { + player.deleteMeta("lastMask"); + } } return regions.toArray(new Region[0]); }