mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-10 16:48:05 +02:00
Fix sethome/seen for invalid players.
This commit is contained in:
@@ -30,7 +30,7 @@ public class Commandseen extends EssentialsCommand
|
|||||||
User u = ess.getOfflineUser(args[0]);
|
User u = ess.getOfflineUser(args[0]);
|
||||||
if (u == null)
|
if (u == null)
|
||||||
{
|
{
|
||||||
return;
|
throw new Exception(Util.i18n("playerNotFound"));
|
||||||
}
|
}
|
||||||
sender.sendMessage(Util.format("seenOffline", u.getDisplayName(), Util.formatDateDiff(u.getLastLogout())));
|
sender.sendMessage(Util.format("seenOffline", u.getDisplayName(), Util.formatDateDiff(u.getLastLogout())));
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,10 @@ public class Commandsethome extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
usersHome = ess.getOfflineUser(args[0]);
|
usersHome = ess.getOfflineUser(args[0]);
|
||||||
}
|
}
|
||||||
|
if (usersHome == null)
|
||||||
|
{
|
||||||
|
throw new Exception(Util.i18n("playerNotFound"));
|
||||||
|
}
|
||||||
usersHome.setHome(user.getLocation(), args[1].equalsIgnoreCase("default"));
|
usersHome.setHome(user.getLocation(), args[1].equalsIgnoreCase("default"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user