mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-31 21:06:31 +00:00
Update BukkitNetworkManager.java
This commit is contained in:
@@ -975,12 +975,14 @@ public class BukkitNetworkManager implements NetworkManager, Listener {
|
||||
}
|
||||
|
||||
private void onNMSPacketReceive(NetWorkUser user, NMSPacketEvent event, Object packet) {
|
||||
Debugger.PACKET.debug(() -> {
|
||||
if (Config.isPacketIgnored(packet.getClass())) {
|
||||
return null;
|
||||
}
|
||||
return "[C->S]" + packet.getClass();
|
||||
});
|
||||
if (VersionHelper.IS_RUNNING_IN_DEV) {
|
||||
Debugger.PACKET.debug(() -> {
|
||||
if (Config.isPacketIgnored(packet.getClass())) {
|
||||
return null;
|
||||
}
|
||||
return "[C->S]" + packet.getClass();
|
||||
});
|
||||
}
|
||||
handleReceiveNMSPacket(user, event, packet);
|
||||
}
|
||||
|
||||
@@ -991,12 +993,14 @@ public class BukkitNetworkManager implements NetworkManager, Listener {
|
||||
onNMSPacketSend(player, event, p);
|
||||
}
|
||||
} else {
|
||||
Debugger.PACKET.debug(() -> {
|
||||
if (Config.isPacketIgnored(packet.getClass())) {
|
||||
return null;
|
||||
}
|
||||
return "[S->C]" + packet.getClass();
|
||||
});
|
||||
if (VersionHelper.IS_RUNNING_IN_DEV) {
|
||||
Debugger.PACKET.debug(() -> {
|
||||
if (Config.isPacketIgnored(packet.getClass())) {
|
||||
return null;
|
||||
}
|
||||
return "[S->C]" + packet.getClass();
|
||||
});
|
||||
}
|
||||
handleSendNMSPacket(player, event, packet);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user