mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-18 20:41:37 +02:00
Check the player we are bringing has permission to enter the world vs the initiating user
This commit is contained in:
@@ -26,7 +26,7 @@ public class Commandtpahere extends EssentialsCommand
|
|||||||
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
||||||
}
|
}
|
||||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
&& !player.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||||
{
|
{
|
||||||
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user