From 209a4ffc427b1bca2d2f313cdc6c8ec0a98f1545 Mon Sep 17 00:00:00 2001 From: Tim203 Date: Mon, 31 May 2021 16:54:02 +0200 Subject: [PATCH] Use the correct plugin message packet. Thanks, Camo --- .../org/geysermc/connector/utils/PluginMessageUtils.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/utils/PluginMessageUtils.java b/connector/src/main/java/org/geysermc/connector/utils/PluginMessageUtils.java index 1569002f9..a914f699e 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/PluginMessageUtils.java +++ b/connector/src/main/java/org/geysermc/connector/utils/PluginMessageUtils.java @@ -25,7 +25,7 @@ package org.geysermc.connector.utils; -import com.github.steveice10.mc.protocol.packet.ingame.server.ServerPluginMessagePacket; +import com.github.steveice10.mc.protocol.packet.ingame.client.ClientPluginMessagePacket; import com.google.common.base.Charsets; import org.geysermc.connector.GeyserConnector; import org.geysermc.connector.network.session.GeyserSession; @@ -74,12 +74,7 @@ public class PluginMessageUtils { } public static void sendMessage(GeyserSession session, String channel, byte[] data) { - byte[] finalData = - ByteBuffer.allocate(data.length + getVarIntLength(data.length)) - .put(writeVarInt(data.length)) - .put(data) - .array(); - session.sendDownstreamPacket(new ServerPluginMessagePacket(channel, finalData)); + session.sendDownstreamPacket(new ClientPluginMessagePacket(channel, data)); } private static byte[] writeVarInt(int value) {