From 87453e98162ce672ab5dc011d40ac522ed9aac95 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Mon, 2 Mar 2015 16:16:22 -0500 Subject: [PATCH] =?UTF-8?q?Correction=20de=20l'ordre=20d'ex=C3=A9cution=20?= =?UTF-8?q?des=20EventHandler=20de=20PlayerQuitEvent=20(NPE=20dans=20Login?= =?UTF-8?q?LogoutMessageManager)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/pandacraftutils/players/OnlinePlayerManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/players/OnlinePlayerManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/players/OnlinePlayerManager.java index a70b490..86b9fa1 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/players/OnlinePlayerManager.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/players/OnlinePlayerManager.java @@ -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());