9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2026-01-01 05:06:43 +00:00

remove eventLoop.submit

This commit is contained in:
XiaoMoMi
2025-12-29 19:27:24 +08:00
parent 1e5e3bea2c
commit 19e30bc29b

View File

@@ -211,14 +211,10 @@ public class BukkitNetworkManager implements PacketSender, PipelineInjector {
}
public void handleDisconnection(Channel channel) {
CNPlayer user = removeUser(channel);
if (user == null) return;
channel.eventLoop().submit(() -> {
if (channel.pipeline().get(NAMEPLATES_PACKET_HANDLER_NAME) != null) {
channel.pipeline().remove(NAMEPLATES_PACKET_HANDLER_NAME);
}
return null;
});
if (channel.pipeline().get(NAMEPLATES_PACKET_HANDLER_NAME) != null) {
channel.pipeline().remove(NAMEPLATES_PACKET_HANDLER_NAME);
}
removeUser(channel);
}
public void injectChannel(Channel channel, ConnectionState connectionState) {