From 846443291fb8f018416459f394f7d923228b926f Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sun, 10 Jan 2021 17:14:40 +0000 Subject: [PATCH] allowed regions can be null --- .../src/main/java/com/boydti/fawe/util/EditSessionBuilder.java | 1 + .../src/main/java/com/sk89q/worldedit/EditSession.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/util/EditSessionBuilder.java b/worldedit-core/src/main/java/com/boydti/fawe/util/EditSessionBuilder.java index 8ec1c03a4..cb6ccff64 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/util/EditSessionBuilder.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/util/EditSessionBuilder.java @@ -457,6 +457,7 @@ public class EditSessionBuilder { return wnaMode; } + @Nullable public Region[] getAllowedRegions() { return allowedRegions; } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java index d142a182a..aa9af053c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -265,7 +265,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable { this.blockBag = builder.getBlockBag(); this.history = changeSet != null; this.wnaMode = builder.isWNAMode(); - this.allowedRegions = builder.getAllowedRegions().clone(); + this.allowedRegions = builder.getAllowedRegions() != null ? builder.getAllowedRegions().clone() : null; } /**