From 55d6217c3222aa579f7d0d408ecdcf4647069c28 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Mon, 11 Nov 2019 19:44:51 +0000 Subject: [PATCH] Check if WORLDEDIT_RESTRICTIONS is enabled Unregister if disabled. --- .../plotsquared/plot/listener/WESubscriber.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WESubscriber.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WESubscriber.java index 9991e8286..753ec2a20 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WESubscriber.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/WESubscriber.java @@ -23,8 +23,7 @@ import java.util.Set; public class WESubscriber { @Subscribe(priority = Priority.VERY_EARLY) public void onEditSession(EditSessionEvent event) { - WorldEdit worldedit = PlotSquared.get().worldedit; - if (worldedit == null) { + if (!Settings.Enabled_Components.WORLDEDIT_RESTRICTIONS) { WorldEdit.getInstance().getEventBus().unregister(this); return; }