Sound Packets use the same player for sender and receiver
CodinGlitch opened this issue ยท 0 comments
Bug description
When using the sound events (I specifically used StaticSoundPacketEvent), the receiver and sender are identical.
I apologize in advance if this happens to just be an oversight on my part.
Steps to reproduce the issue
- Hook an event to (I assume) any of the sound events
- Log/Use debugger to view both receiverConnection and senderConnection
- Both connections use the sender as the player field
Expected behavior
For the receiver connection to contain the receiver of the packet instead of the sender.
Versions
- Tested on 1.19.2
- Fabric
- Simple Voice Chat 1.19.2-2.3.27
Screenshots
In here you can see that the player under receiverConnection and the player under senderConnection are the same, while the player states are different.
An instance of the sender seemingly being passed to onSoundPacket instead of the receiver in the Server class.