Skip to content

Commit

Permalink
Use logger field
Browse files Browse the repository at this point in the history
  • Loading branch information
Earthcomputer committed May 29, 2024
1 parent d6a4759 commit 2333dd0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,15 @@ public static boolean handleC2CPacket(String content) {
return false;
}
if (buf.readableBytes() > 0) {
LOGGER.error("Found extra bytes while reading C2C packet {}", packet.type());
return false;
}
ListenCommand.onPacket(packet, ListenCommand.PacketFlow.C2C_INBOUND);
try {
packet.handle(C2CPacketHandler.getInstance());
} catch (Throwable e) {
Minecraft.getInstance().gui.getChat().addMessage(Component.nullToEmpty(e.getMessage()));
LogUtils.getLogger().error("Error handling C2C packet", e);
LOGGER.error("Error handling C2C packet", e);
}
return true;
}
Expand Down

0 comments on commit 2333dd0

Please sign in to comment.