summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandtpo.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpo.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java
index 504730306..50c239c38 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java
@@ -22,8 +22,8 @@ public class Commandtpo extends EssentialsCommand
throw new NotEnoughArgumentsException();
case 1:
- final User player = getPlayer(server, args, 0, true);
- if (!player.isOnline() || (player.isHidden() && !user.isAuthorized("essentials.teleport.hidden")))
+ final User player = getPlayer(server, args, 0, true, false);
+ if (player.isHidden() && !user.isAuthorized("essentials.teleport.hidden"))
{
throw new NoSuchFieldException(_("playerNotFound"));
}
@@ -42,11 +42,10 @@ public class Commandtpo extends EssentialsCommand
throw new Exception(_("noPerm", "essentials.tp.others"));
}
user.sendMessage(_("teleporting"));
- final User target = getPlayer(server, args, 0, true);
- final User toPlayer = getPlayer(server, args, 1, true);
+ final User target = getPlayer(server, args, 0, true, false);
+ final User toPlayer = getPlayer(server, args, 1, true, false);
- if (!target.isOnline() || !toPlayer.isOnline()
- || ((target.isHidden() || toPlayer.isHidden()) && !user.isAuthorized("essentials.teleport.hidden")))
+ if ((target.isHidden() || toPlayer.isHidden()) && !user.isAuthorized("essentials.teleport.hidden"))
{
throw new NoSuchFieldException(_("playerNotFound"));
}