henkelmax / simple-voice-chat

A working voice chat in Minecraft!
https://modrepo.de/minecraft/voicechat/wiki
455 stars 112 forks source link

Sound Packets use the same player for sender and receiver #540

Closed CodinGlitch closed 1 year ago

CodinGlitch commented 1 year ago

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

  1. Hook an event to (I assume) any of the sound events
  2. Log/Use debugger to view both receiverConnection and senderConnection
  3. 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

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. image

An instance of the sender seemingly being passed to onSoundPacket instead of the receiver in the Server class. image