9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-28 03:19:14 +00:00

refactor(resourcepack): 移除 DelayedTasks

This commit is contained in:
jhqwqmc
2025-06-17 01:54:10 +08:00
parent 0607e59d49
commit 0e6533aeb2
2 changed files with 1 additions and 28 deletions

View File

@@ -11,7 +11,6 @@ import java.util.Optional;
public class NMSPacketEvent implements Cancellable {
private final Object packet;
private boolean cancelled;
private List<Runnable> delayedTasks = null;
private Object newPacket = null;
public NMSPacketEvent(Object packet) {
@@ -34,17 +33,6 @@ public class NMSPacketEvent implements Cancellable {
return newPacket;
}
public void addDelayedTask(Runnable task) {
if (delayedTasks == null) {
delayedTasks = new ArrayList<>();
}
delayedTasks.add(task);
}
public List<Runnable> getDelayedTasks() {
return Optional.ofNullable(delayedTasks).orElse(Collections.emptyList());
}
@Override
public boolean isCancelled() {
return cancelled;