Fix Player#sendPluginMessage

This commit is contained in:
Felix Cravic 2020-08-15 13:42:27 +02:00
parent 939d06cfb5
commit ab86400e80

View File

@ -624,7 +624,13 @@ public class Player extends LivingEntity implements CommandSender {
* @param message the message
*/
public void sendPluginMessage(String channel, String message) {
sendPluginMessage(channel, message.getBytes());
// Write the data
PacketWriter writer = new PacketWriter();
writer.writeSizedString(message);
// Retrieve the data
final byte[] data = writer.toByteArray();
sendPluginMessage(channel, data);
}
/**