diff --git a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java index a35181aaed7..46d6267f884 100644 --- a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java +++ b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java @@ -628,15 +628,11 @@ public void sendUpstreamPacket(BedrockPacket packet) { /** * Inject a packet as if it was received by the upstream client * @param packet the bedrock packet to be injected + * @return true if handled */ @SuppressWarnings("unused") - public void receiveUpstreamPacket(BedrockPacket packet) { - try { - Method handle = getUpstream().getSession().getPacketHandler().getClass().getMethod("handle", packet.getClass()); - handle.invoke(getUpstream().getSession().getPacketHandler(), packet); - } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { - connector.getLogger().error("Tried to inject upstream packet " + packet + " but it is not handled"); - } + public boolean receiveUpstreamPacket(BedrockPacket packet) { + return packet.handle(getUpstream().getSession().getPacketHandler()); } /** diff --git a/connector/src/main/resources/languages b/connector/src/main/resources/languages index 8a62f3730bd..65e36478b89 160000 --- a/connector/src/main/resources/languages +++ b/connector/src/main/resources/languages @@ -1 +1 @@ -Subproject commit 8a62f3730bd1ae94262315ad1535b5d5523de189 +Subproject commit 65e36478b894af9cec74bc6df6552cb160a0c47d