mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-14 14:24:37 +01:00
Small fix to packet logging
This commit is contained in:
@@ -170,15 +170,15 @@ public class GameSession {
|
|||||||
* @param cmdId
|
* @param cmdId
|
||||||
*/
|
*/
|
||||||
public void send(int cmdId) {
|
public void send(int cmdId) {
|
||||||
|
// Get packet from the server's packet cache. This will allow us to reuse empty packets if needed.
|
||||||
if (this.ukcp != null) {
|
if (this.ukcp != null) {
|
||||||
// Get packet from the server's packet cache. This will allow us to reuse empty packets if needed.
|
this.ukcp.write(getServer().getPacketCache().getCachedPacket(cmdId));
|
||||||
this.ukcp.write(this.getServer().getPacketCache().getCachedPacket(cmdId));
|
}
|
||||||
|
|
||||||
// Log
|
// Log
|
||||||
if (LunarCore.getConfig().getLogOptions().packets) {
|
if (LunarCore.getConfig().getLogOptions().packets) {
|
||||||
if (!(LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(cmdId))) {
|
if (!(LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(cmdId))) {
|
||||||
logPacket("RECV", cmdId, Utils.EMPTY_BYTE_ARRAY);
|
logPacket("SEND", cmdId, Utils.EMPTY_BYTE_ARRAY);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user