mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 20:43:11 +00:00
New permission: essentials.tp.others - Allows players to /tp <p1> <p2> replaces old reused permission.
New permission usage: if world-teleport-permissions is true in the config, TP commands will now check for essentials.world.<worldname> when a tp would switch worlds.
This commit is contained in:
parent
e4ce814c2f
commit
762105d692
12 changed files with 20 additions and 16 deletions
|
@ -36,6 +36,11 @@ public class Commandtpa extends EssentialsCommand
|
|||
player.sendMessage(_("teleportRequestTimeoutInfo", ess.getSettings().getTpaAcceptCancellation()));
|
||||
}
|
||||
}
|
||||
if (user.getWorld() != player.getWorld() && ess.getSettings().getIsWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + player.getWorld().getName()))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.world." + player.getWorld().getName()));
|
||||
}
|
||||
user.sendMessage(_("requestSent", player.getDisplayName()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue