Correction de l'ordre d'exécution des EventHandler de PlayerQuitEvent (NPE dans LoginLogoutMessageManager)

This commit is contained in:
Marc Baloup 2015-03-02 16:16:22 -05:00
parent 0beeb02fd3
commit 87453e9816

View File

@ -10,6 +10,7 @@ import net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
@ -56,13 +57,13 @@ public final class OnlinePlayerManager implements Listener {
// ----------------------------------------
// -------------- Evènements --------------
// ----------------------------------------
@EventHandler
@EventHandler(priority=EventPriority.LOWEST)
public void onPlayerJoin (PlayerJoinEvent event)
{
players.put(event.getPlayer(), new OnlinePlayer(event.getPlayer()));
}
@EventHandler
@EventHandler(priority=EventPriority.HIGHEST)
public void onPlayerQuit (PlayerQuitEvent event)
{
players.remove(event.getPlayer());