summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgravypod <gravypod@gravypod.com>2012-12-31 11:10:38 -0500
committergravypod <gravypod@gravypod.com>2012-12-31 11:10:38 -0500
commitb35ec5ad2d72acae4eb9d9521c9e4b48d3318079 (patch)
treeafe85f974bc95855be4f05ff0aaad85486d1ffdc
parent86619275992b4b29bfac91897986b10f2ef863cb (diff)
downloadEssentials-b35ec5ad2d72acae4eb9d9521c9e4b48d3318079.tar
Essentials-b35ec5ad2d72acae4eb9d9521c9e4b48d3318079.tar.gz
Essentials-b35ec5ad2d72acae4eb9d9521c9e4b48d3318079.tar.lz
Essentials-b35ec5ad2d72acae4eb9d9521c9e4b48d3318079.tar.xz
Essentials-b35ec5ad2d72acae4eb9d9521c9e4b48d3318079.zip
Fix an NPE
Player dies, clicks title screen, logs in, respawns, NPE thrown.
-rw-r--r--Essentials/src/net/ess3/listener/EssentialsPlayerListener.java4
1 files changed, 4 insertions, 0 deletions
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();