Flush viewable packets at the end of every test

This commit is contained in:
themode 2022-02-13 13:22:44 +01:00
parent 2438393ce1
commit 367c5ec35a

View File

@ -5,6 +5,7 @@ import net.minestom.server.event.Event;
import net.minestom.server.event.EventFilter;
import net.minestom.server.event.EventListener;
import net.minestom.server.event.EventNode;
import net.minestom.server.utils.PacketUtils;
import org.jetbrains.annotations.NotNull;
import java.util.List;
@ -51,6 +52,7 @@ final class EnvImpl implements Env {
}
void cleanup() {
PacketUtils.flush();
this.listeners.forEach(FlexibleListenerImpl::check);
}