Restore getUser API

This commit is contained in:
KHobbits 2013-10-17 23:55:42 +01:00
parent 6f85761f7f
commit be31b1695d
3 changed files with 21 additions and 4 deletions

View file

@ -44,9 +44,9 @@ public class Commandr extends EssentialsCommand
}
final CommandSource target = replyTo.getReplyTo();
final String targetName = target instanceof Player ? ((Player)target).getDisplayName() : Console.NAME;
final String targetName = target.isPlayer() ? target.getPlayer().getDisplayName() : Console.NAME;
if (target == null || ((target instanceof Player) && !((Player)target).isOnline()))
if (target == null || (target.isPlayer() && !target.getPlayer().isOnline()))
{
throw new Exception(_("foreverAlone"));
}