Fix tp permissions check to check player typing command not teleportee.

If you don't want players inviting players to other worlds, do not give them essentials.world.<currentworld>
This commit is contained in:
KHobbits 2012-08-08 22:50:54 +01:00
parent 8e50158af8
commit dd12e5db66
5 changed files with 5 additions and 5 deletions

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()
&& !target.isAuthorized("essentials.world." + toPlayer.getWorld().getName()))
&& !user.isAuthorized("essentials.world." + toPlayer.getWorld().getName()))
{
throw new Exception(_("noPerm", "essentials.world." + toPlayer.getWorld().getName()));
}