3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-04 18:40:06 +01:00

refactor: Deprecate tick limiter API for public use

Dieser Commit ist enthalten in:
NotMyFault 2022-01-04 20:33:05 +01:00
Ursprung 42dacfc7ef
Commit b8399abfe1
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 158F5701A6AAD00C
3 geänderte Dateien mit 39 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -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<Boolean> 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();

Datei anzeigen

@ -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();
}

Datei anzeigen

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