Check the player we are bringing has permission to enter the world vs the initiating user the final frontier

This commit is contained in:
Paul A. 2012-08-01 16:04:13 +02:00
parent 2fbdf7e4d6
commit a1ac58d17c

View file

@ -58,7 +58,7 @@ public class Commandtp extends EssentialsCommand
throw new Exception(_("teleportDisabled", toPlayer.getDisplayName()));
}
if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().isWorldTeleportPermissions()
&& !player.isAuthorized("essentials.world." + toPlayer.getWorld().getName()))
&& !target.isAuthorized("essentials.world." + toPlayer.getWorld().getName()))
{
throw new Exception(_("noPerm", "essentials.world." + toPlayer.getWorld().getName()));
}