From c713cf049da1570a37903b364dd3c0440f521350 Mon Sep 17 00:00:00 2001 From: Scald <104459145+Arikatsu@users.noreply.github.com> Date: Tue, 28 Nov 2023 23:42:31 +0530 Subject: [PATCH] Rename `loopPackets` to `filterLoopingPackets` --- src/main/java/emu/lunarcore/Config.java | 2 +- src/main/java/emu/lunarcore/server/game/GameSession.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/emu/lunarcore/Config.java b/src/main/java/emu/lunarcore/Config.java index dd24acab5..703321e45 100644 --- a/src/main/java/emu/lunarcore/Config.java +++ b/src/main/java/emu/lunarcore/Config.java @@ -130,7 +130,7 @@ public static class LogOptions { public boolean commands = true; public boolean connections = true; public boolean packets = false; - public boolean loopPackets = false; + public boolean filterLoopingPackets = false; } @Getter diff --git a/src/main/java/emu/lunarcore/server/game/GameSession.java b/src/main/java/emu/lunarcore/server/game/GameSession.java index 8e939106d..33b289b18 100644 --- a/src/main/java/emu/lunarcore/server/game/GameSession.java +++ b/src/main/java/emu/lunarcore/server/game/GameSession.java @@ -127,7 +127,7 @@ public void onMessage(ByteBuf packet) { // Log packet if (LunarCore.getConfig().getLogOptions().packets) { - if (LunarCore.getConfig().getLogOptions().loopPackets && CmdIdUtils.LOOP_PACKETS.contains(opcode)) { + if (LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(opcode)) { return; } @@ -156,7 +156,7 @@ public void send(BasePacket packet) { // Log if (LunarCore.getConfig().getLogOptions().packets) { - if (LunarCore.getConfig().getLogOptions().loopPackets && CmdIdUtils.LOOP_PACKETS.contains(packet.getOpcode())) { + if (LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(packet.getOpcode())) { return; } @@ -175,7 +175,7 @@ public void send(int cmdId) { // Log if (LunarCore.getConfig().getLogOptions().packets) { - if (LunarCore.getConfig().getLogOptions().loopPackets && CmdIdUtils.LOOP_PACKETS.contains(cmdId)) { + if (LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(cmdId)) { return; }