diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener.java index f3051536d..5d2e35335 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener.java @@ -45,6 +45,11 @@ import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginManager; import org.bukkit.util.Vector; +/** + * @deprecated FAWE is not necessarily the tool you want to use to limit certain tick actions, e.g. fireworks or elytra flying. + * The code is untouched since the 1.12 era and there is no guarantee that it will work or will be maintained in the future. + */ +@Deprecated(since = "2.0.0") public abstract class ChunkListener implements Listener { private static final Logger LOGGER = LogManagerCompat.getLogger(); @@ -88,7 +93,15 @@ public abstract class ChunkListener implements Listener { protected abstract StackTraceElement getElement(Exception ex, int index); + /** + * @deprecated see {@link com.fastasyncworldedit.bukkit.listener.ChunkListener} for an explanation of the deprecation + */ + @Deprecated(since = "2.0.0") public static boolean physicsFreeze = false; + /** + * @deprecated see {@link com.fastasyncworldedit.bukkit.listener.ChunkListener} for an explanation of the deprecation + */ + @Deprecated(since = "2.0.0") public static boolean itemFreeze = false; protected final Long2ObjectOpenHashMap badChunks = new Long2ObjectOpenHashMap<>(); @@ -97,6 +110,10 @@ public abstract class ChunkListener implements Listener { private int lastZ = Integer.MIN_VALUE; private int[] lastCount; + /** + * @deprecated see {@link com.fastasyncworldedit.bukkit.listener.ChunkListener} for an explanation of the deprecation + */ + @Deprecated(since = "2.0.0") public int[] getCount(int cx, int cz) { if (lastX == cx && lastZ == cz) { return lastCount; @@ -112,6 +129,10 @@ public abstract class ChunkListener implements Listener { return tmp; } + /** + * @deprecated see {@link com.fastasyncworldedit.bukkit.listener.ChunkListener} for an explanation of the deprecation + */ + @Deprecated(since = "2.0.0") public void cleanup(Chunk chunk) { for (Entity entity : chunk.getEntities()) { if (entity.getType() == EntityType.DROPPED_ITEM) { @@ -128,6 +149,10 @@ public abstract class ChunkListener implements Listener { protected long physStart; protected long physTick; + /** + * @deprecated see {@link com.fastasyncworldedit.bukkit.listener.ChunkListener} for an explanation of the deprecation + */ + @Deprecated(since = "2.0.0") public final void reset() { physSkip = 0; physStart = System.currentTimeMillis(); diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener9.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener9.java index 0d93b95d3..c20435ac3 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener9.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener9.java @@ -9,11 +9,20 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.block.BlockPhysicsEvent; +/** + * @deprecated FAWE is not necessarily the tool you want to use to limit certain tick actions, e.g. fireworks or elytra flying. + * The code is untouched since the 1.12 era and there is no guarantee that it will work or will be maintained in the future. + */ +@Deprecated(since = "2.0.0") public class ChunkListener9 extends ChunkListener { private Exception exception; private StackTraceElement[] elements; + /** + * @deprecated see {@link com.fastasyncworldedit.bukkit.listener.ChunkListener9} for an explanation of the deprecation + */ + @Deprecated(since = "2.0.0") public ChunkListener9() { super(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java index 8f899afd5..4b43c0376 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Settings.java @@ -672,6 +672,11 @@ public class Settings extends Config { } + /** + * @deprecated FAWE is not necessarily the tool you want to use to limit certain tick actions, e.g. fireworks or elytra flying. + * The code is untouched since the 1.12 era and there is no guarantee that it will work or will be maintained in the future. + */ + @Deprecated(since = "2.0.0") @Comment("Generic tick limiter (not necessarily WorldEdit related, but useful to stop abuse)") public static class TICK_LIMITER {