mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-02 17:09:58 +01:00
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:
parent
8e50158af8
commit
dd12e5db66
@ -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()));
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class Commandtpahere extends EssentialsCommand
|
||||
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
||||
}
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !player.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class Commandtpall extends EssentialsCommand
|
||||
continue;
|
||||
}
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !player.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ public class Commandtphere extends EssentialsCommand
|
||||
throw new Exception(_("teleportDisabled", player.getDisplayName()));
|
||||
}
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !player.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class Commandtpohere extends EssentialsCommand
|
||||
}
|
||||
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !player.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
&& !user.isAuthorized("essentials.world." + user.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + user.getWorld().getName()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user