Mindgamesnl/OpenAudioMc

Player not in the voicechat range after another player disconnect and rejoin (Bungeecord)

Closed this issue · 3 comments

Describe the bug
The people who connect to voice chat at first time since server start can talk to each other and found within the range.
But then after they disconnect and reconnect again in some other time. That person cannot found in the range and can't be able to talk to other person that still on the same server.

Step to reproduce

  1. Run the bungeecord and spigot
  2. Person A join the server, connect and link to audio.
  3. Person B join the server, connect and link to audio.
  4. After a while. Person B disconnect from the server and close the browser tab.
  5. Person B join the server, connect and link to audio again.
  6. Person B can't be found within the range of Person A.

Desktop (please complete the following information):

  • Plugin Version: 6.5.7
  • Server Version: CraftBukkit version git-PaperSpigot-"4c7641d" (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT
  • Bungeecord Version: git:BungeeCord-Bootstrap:1.17-R0.1-SNAPSHOT:c3fffbc:1608
  • Web client used: Self-hosted based on build 814
  • Other setup details: Bungeecord with onlinemode, Plugins install both bungeecord and PaperSpigot

Additional context
There's no error on console in both bungee and spigot.

This seemed to be caused by API changes in 1.12 that we adapted to in one of the last two releases (the one where we added the in-game mute shortcut)

This broke 1.8 compatibility (because we don't test for that version anymore, and purely consider it legacy because it's oa user-base just isn't worth the trouble)

The core issue itself comes from the swap hands event, registered in the PlayerConnectionListener.java. Bukkit fails to register all events in that class after encountering the error, which leads to internal memory leaks and state corruptions within OpenAudioMc's session tracker.

This can be solved by adding a version check, and only enabling the feature if the server is running 1.12<, or manually compiling a build with that feature stripped out.

Feel free to submit a PR for the first solution if you have time for it (because I personally don't at the moment) or handle the second solution on your own, but with that, lose support because you'll be running a fork.

Bump, did this get you anywhere, @Charon-3?

I moved to 1.12.2