Fixed encoding not properly working with other packet reading libraries

Injecting a message to byte encoder beforehand would break outbound packets in ViaVersion. This solution is a good fix which won't impact anything.
This commit is contained in:
Thibaut Gautier 2021-01-17 13:12:18 +01:00
parent c0fb81946e
commit 91319402f3
1 changed files with 3 additions and 1 deletions

View File

@ -54,8 +54,10 @@ public class BukkitEncodeHandler extends MessageToByteEncoder implements ViaHand
throw (Error) e.getCause();
}
}
} else {
bytebuf.clear().writeBytes((ByteBuf) o);
}
transform(bytebuf);
}