diff options
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandseen.java | 2 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandsethome.java | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java index 6e87b116f..c355f5aff 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java @@ -30,7 +30,7 @@ public class Commandseen extends EssentialsCommand User u = ess.getOfflineUser(args[0]); if (u == null) { - return; + throw new Exception(Util.i18n("playerNotFound")); } sender.sendMessage(Util.format("seenOffline", u.getDisplayName(), Util.formatDateDiff(u.getLastLogout()))); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java index e07572f95..154017d43 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java @@ -30,6 +30,10 @@ public class Commandsethome extends EssentialsCommand { usersHome = ess.getOfflineUser(args[0]); } + if (usersHome == null) + { + throw new Exception(Util.i18n("playerNotFound")); + } usersHome.setHome(user.getLocation(), args[1].equalsIgnoreCase("default")); } } |