Bump to HIGHEST priority for PlayerRespawnEvent.
Plugins like Multiverse and EssentialsX have features that override the world spawn location for players respawning both with and without bed locations. If MobArena catches the PlayerRespawnEvent too early, these plugins will likely overwrite the respawn location set for players that respawn after dying in an arena session. Because MobArena is a minigame and its respawn manipulation logic only runs for respawning arena players, it is perfectly reasonable for it to get the final say in where these players should respawn. It would have been nice to just use `HIGH`, but that is what EssentialsX runs at, so we gotta go higher than that.
This commit is contained in:
@@ -333,7 +333,7 @@ public class MAGlobalListener implements Listener
|
||||
arena.getEventListener().onPlayerQuit(event);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void playerRespawn(PlayerRespawnEvent event) {
|
||||
for (Arena arena : am.getArenas()) {
|
||||
if (arena.getEventListener().onPlayerRespawn(event)) {
|
||||
|
||||
Reference in New Issue
Block a user