From b35ec5ad2d72acae4eb9d9521c9e4b48d3318079 Mon Sep 17 00:00:00 2001 From: gravypod Date: Mon, 31 Dec 2012 11:10:38 -0500 Subject: Fix an NPE Player dies, clicks title screen, logs in, respawns, NPE thrown. --- Essentials/src/net/ess3/listener/EssentialsPlayerListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Essentials/src/net/ess3/listener/EssentialsPlayerListener.java b/Essentials/src/net/ess3/listener/EssentialsPlayerListener.java index e24fdc64e..f7d7d3942 100644 --- a/Essentials/src/net/ess3/listener/EssentialsPlayerListener.java +++ b/Essentials/src/net/ess3/listener/EssentialsPlayerListener.java @@ -53,6 +53,10 @@ public class EssentialsPlayerListener implements Listener @EventHandler(priority = EventPriority.NORMAL) public void onPlayerRespawn(final PlayerRespawnEvent event) { + final Player player = event.getPlayer(); + if (!player.isOnline()) { + return; + } final IUser user = userMap.getUser(event.getPlayer()); user.updateCompass(); user.updateDisplayName(); -- cgit v1.2.3