getSoundEffects() is always empty.
KillerCreeper112 opened this issue ยท 1 comments
- This issue is not solved in a development build
Describe the bug
When trying to get what sound a packet sends using the PacketContainer#getSoundEffects() functions, it always returns with a size of 0, no matter what.
To Reproduce
Steps to reproduce the behavior:
Set up a packet listener. Here is the code I used:
@Override
public void onPacketSending(PacketEvent event) {
if (event.getPacketType() == PacketType.Play.Server.NAMED_SOUND_EFFECT) {
PacketContainer packet = event.getPacket();
Bukkit.broadcast(Component.text(packet.getSoundEffects().size()));
Bukkit.broadcast(Component.text(packet.getSoundEffects().getValues().size()));
}
}
};
Expected behavior
The broadcast prints out at least a size of 1 when a sound is being placed.
Version Info
https://pastebin.com/vAXiJ2dc