From 909b81275b54c9a0db7e4371f5884fb13aa578ba Mon Sep 17 00:00:00 2001 From: Blue Kelp Date: Thu, 1 Aug 2019 18:53:35 -0700 Subject: [PATCH] fixup default logging base class - removed translation of some packets (left over from original source) - all events are handled the same way now and translation is only performed in the subclass --- .../connector/network/LoggingPacketHandler.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/LoggingPacketHandler.java b/connector/src/main/java/org/geysermc/connector/network/LoggingPacketHandler.java index 6c1241394..c46aa66eb 100644 --- a/connector/src/main/java/org/geysermc/connector/network/LoggingPacketHandler.java +++ b/connector/src/main/java/org/geysermc/connector/network/LoggingPacketHandler.java @@ -30,7 +30,6 @@ import com.nukkitx.protocol.bedrock.handler.BedrockPacketHandler; import com.nukkitx.protocol.bedrock.packet.*; import org.geysermc.connector.GeyserConnector; import org.geysermc.connector.network.session.GeyserSession; -import org.geysermc.connector.network.translators.Registry; /** * Bare bones implementation of BedrockPacketHandler suitable for extension. @@ -70,9 +69,7 @@ public class LoggingPacketHandler implements BedrockPacketHandler { @Override public boolean handle(AnimatePacket packet) { - connector.getLogger().debug("Handled packet: " + packet.getClass().getSimpleName()); - Registry.BEDROCK.translate(packet.getClass(), packet, session); - return true; + return defaultHandler(packet); } @Override @@ -117,9 +114,7 @@ public class LoggingPacketHandler implements BedrockPacketHandler { @Override public boolean handle(CommandRequestPacket packet) { - connector.getLogger().debug("Handled packet: " + packet.getClass().getSimpleName()); - Registry.BEDROCK.translate(packet.getClass(), packet, session); - return true; + return defaultHandler(packet); } @Override @@ -309,9 +304,7 @@ public class LoggingPacketHandler implements BedrockPacketHandler { @Override public boolean handle(TextPacket packet) { - connector.getLogger().debug("Handled packet: " + packet.getClass().getSimpleName()); - Registry.BEDROCK.translate(packet.getClass(), packet, session); - return true; + return defaultHandler(packet); } @Override