Correction de l'ordre d'exécution des EventHandler de PlayerQuitEvent (NPE dans LoginLogoutMessageManager)
This commit is contained in:
parent
0beeb02fd3
commit
87453e9816
@ -10,6 +10,7 @@ import net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils;
|
|||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
@ -56,13 +57,13 @@ public final class OnlinePlayerManager implements Listener {
|
|||||||
// ----------------------------------------
|
// ----------------------------------------
|
||||||
// -------------- Evènements --------------
|
// -------------- Evènements --------------
|
||||||
// ----------------------------------------
|
// ----------------------------------------
|
||||||
@EventHandler
|
@EventHandler(priority=EventPriority.LOWEST)
|
||||||
public void onPlayerJoin (PlayerJoinEvent event)
|
public void onPlayerJoin (PlayerJoinEvent event)
|
||||||
{
|
{
|
||||||
players.put(event.getPlayer(), new OnlinePlayer(event.getPlayer()));
|
players.put(event.getPlayer(), new OnlinePlayer(event.getPlayer()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler(priority=EventPriority.HIGHEST)
|
||||||
public void onPlayerQuit (PlayerQuitEvent event)
|
public void onPlayerQuit (PlayerQuitEvent event)
|
||||||
{
|
{
|
||||||
players.remove(event.getPlayer());
|
players.remove(event.getPlayer());
|
||||||
|
Loading…
Reference in New Issue
Block a user