From 6941b48038125d1a37196b0fe1c2e8a7540452f6 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Sat, 6 Feb 2021 10:21:34 -0300 Subject: [PATCH] fixed pending #2291 changes --- .../myles/ViaVersion/bukkit/handlers/BukkitEncodeHandler.java | 2 +- .../myles/ViaVersion/sponge/handlers/SpongeEncodeHandler.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/handlers/BukkitEncodeHandler.java b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/handlers/BukkitEncodeHandler.java index 63ee36b6d..4ab8efb3b 100644 --- a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/handlers/BukkitEncodeHandler.java +++ b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/handlers/BukkitEncodeHandler.java @@ -56,7 +56,7 @@ public class BukkitEncodeHandler extends MessageToByteEncoder implements ViaHand } } else { - bytebuf.clear().writeBytes((ByteBuf) o); + bytebuf.writeBytes((ByteBuf) o); } transform(bytebuf); } diff --git a/sponge/src/main/java/us/myles/ViaVersion/sponge/handlers/SpongeEncodeHandler.java b/sponge/src/main/java/us/myles/ViaVersion/sponge/handlers/SpongeEncodeHandler.java index 6b643081c..ecd85a684 100644 --- a/sponge/src/main/java/us/myles/ViaVersion/sponge/handlers/SpongeEncodeHandler.java +++ b/sponge/src/main/java/us/myles/ViaVersion/sponge/handlers/SpongeEncodeHandler.java @@ -35,8 +35,9 @@ public class SpongeEncodeHandler extends MessageToByteEncoder implements throw (Error) e.getCause(); } } + } else { + bytebuf.write((ByteBuf) o) } - transform(bytebuf); }