BungeeTabListPlus icon indicating copy to clipboard operation
BungeeTabListPlus copied to clipboard

[Bungee] Change PlayerDisconnectEvent priority to LOWEST

Open karer opened this issue 4 years ago • 3 comments

Setting server to null could cause problems with other plugins. E.g. with auth, which stores player's latest server in database. It has normal priority and gets current server as 'null', because of BungeeTabListPlus.

This PR:

  1. Changes event priority to lowest,
  2. Removes manual disconnection

... so other plugins get valid info about current server.

karer avatar Mar 17 '20 13:03 karer

The code you remove is there as a workaround for the following BungeeCord bug: https://github.com/SpigotMC/BungeeCord/issues/1601.

CodeCrafter47 avatar Mar 17 '20 16:03 CodeCrafter47

I'd be okay with the priority change if that helps.

CodeCrafter47 avatar Mar 25 '20 08:03 CodeCrafter47

Just so that nobody pulls this without considering this: Changing the priority from HIGHEST (which means run last) to LOWEST (runs first) would actually cause the issues described as now plugins listening on any higher level (LOW, NORMAL/none specified, HIGH, HIGHEST) would all listen after BTLP disconnects the player. So changing the priority would not solve anything and as it stands right now any plugin listening on anything below HIGHEST should not run into any issues? If they are occurring then someone should provide some example code that actually runs into those issues.

Phoenix616 avatar Dec 10 '22 13:12 Phoenix616