From 8bcd8d415e9b5227bfc844f30017c3efa8c84331 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Thu, 10 Mar 2022 16:07:40 +0000 Subject: [PATCH] Only add extent to WE operations once --- .../main/java/com/plotsquared/core/listener/WESubscriber.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/src/main/java/com/plotsquared/core/listener/WESubscriber.java b/Core/src/main/java/com/plotsquared/core/listener/WESubscriber.java index ed0d15319..0c2fca1bd 100644 --- a/Core/src/main/java/com/plotsquared/core/listener/WESubscriber.java +++ b/Core/src/main/java/com/plotsquared/core/listener/WESubscriber.java @@ -35,6 +35,7 @@ import com.plotsquared.core.plot.world.PlotAreaManager; import com.plotsquared.core.util.Permissions; import com.plotsquared.core.util.WEManager; import com.plotsquared.core.util.WorldUtil; +import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.event.extent.EditSessionEvent; @@ -67,6 +68,9 @@ public class WESubscriber { WorldEdit.getInstance().getEventBus().unregister(this); return; } + if (event.getStage() != EditSession.Stage.BEFORE_HISTORY) { + return; + } World worldObj = event.getWorld(); if (worldObj == null) { return;