From ca5ad58f012596065572205e4d0a814ce21ff44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien?= <43724816+Aurelien30000@users.noreply.github.com> Date: Thu, 23 Dec 2021 12:39:11 +0100 Subject: [PATCH] Fix WEManager (#1487) * Fix WeManager? * Fix WeManager? * Also register WEManager if not available, like TaskManager. --- .../java/com/fastasyncworldedit/core/util/WEManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 3b2a4782e..9839d84e6 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 @@ -32,7 +32,7 @@ public class WEManager { * @deprecated Use {@link #weManager()} instead. */ @Deprecated(forRemoval = true, since = "2.0.0") - private final WEManager IMP = new WEManager(); + public static WEManager IMP = new WEManager(); private final ArrayDeque managers = new ArrayDeque<>(); private WEManager() { @@ -45,6 +45,9 @@ public class WEManager { * @return an instance of the WEManager */ public static WEManager weManager() { + if (INSTANCE == null) { + INSTANCE = new WEManager(); + } return INSTANCE; }