From aeb2820d89192f8875e53f632910b259c4728f19 Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Mon, 27 Apr 2020 19:17:23 -0400 Subject: [PATCH] Add debug message to addProcessor --- .../worldedit/extent/AbstractDelegateExtent.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java index 8581b2148..7e590be46 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java @@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import static org.slf4j.LoggerFactory.getLogger; import com.boydti.fawe.beta.IBatchProcessor; +import com.boydti.fawe.config.Settings; import com.boydti.fawe.object.HistoryExtent; import com.boydti.fawe.object.changeset.AbstractChangeSet; import com.boydti.fawe.object.exception.FaweException; @@ -31,6 +32,7 @@ import com.sk89q.jnbt.CompoundTag; import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.entity.BaseEntity; import com.sk89q.worldedit.entity.Entity; +import com.sk89q.worldedit.extension.platform.PlatformManager; import com.sk89q.worldedit.extent.buffer.ForgetfulExtentBuffer; import com.sk89q.worldedit.function.operation.Operation; import com.sk89q.worldedit.function.operation.OperationQueue; @@ -47,12 +49,16 @@ import java.util.List; import javax.annotation.Nullable; import org.jetbrains.annotations.Range; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A base class for {@link Extent}s that merely passes extents onto another. */ public class AbstractDelegateExtent implements Extent { + private static final Logger logger = LoggerFactory.getLogger(AbstractDelegateExtent.class); + private final Extent extent; /** @@ -239,6 +245,15 @@ public class AbstractDelegateExtent implements Extent { @Override public Extent addProcessor(IBatchProcessor processor) { + if (Settings.IMP.EXPERIMENTAL.OTHER) { + logger.info("addProcessor Info: \t " + processor.getClass().getName()); + logger.info("The following is not an error or a crash:"); + StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); + for (StackTraceElement stackTraceElement : stackTrace) { + logger.info(stackTraceElement.toString()); + } + + } Extent result = this.extent.addProcessor(processor); if (result != this.extent) { new ExtentTraverser(this).setNext(result);