1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-08 07:36:42 +02:00

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 dcc53cbf30
commit 079ed0d2da

View File

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