Fix null locations in /seen

This commit is contained in:
KHobbits 2012-04-14 15:57:47 +01:00
parent 45de85dae2
commit 055603b09e
2 changed files with 4 additions and 1 deletions

View file

@ -116,6 +116,7 @@ public class EssentialsPlayerListener implements Listener
{
user.toggleGodModeEnabled();
}
user.setLastLocation();
user.updateActivity(false);
user.dispose();
}

View file

@ -60,7 +60,9 @@ public class Commandseen extends EssentialsCommand
{
sender.sendMessage(_("whoisIPAddress", player.getLastLoginAddress()));
final Location loc = player.getLastLocation();
sender.sendMessage(_("whoisLocation", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
if (loc != null) {
sender.sendMessage(_("whoisLocation", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
}
}
}
}