Only add extent to WE operations once (#3537)

This commit is contained in:
Jordan 2022-03-10 21:40:09 +00:00 committed by GitHub
parent 5f233bb5d1
commit 308dba5601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;