mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-31 09:52:57 +00:00
Update tp to check if target player has tptoggle disabled.
Update tpo to allow player to player tp.
This commit is contained in:
parent
47cf1289d7
commit
2cc96e995b
3 changed files with 43 additions and 19 deletions
|
@ -49,6 +49,14 @@ public class Commandtp extends EssentialsCommand
|
|||
user.sendMessage(_("teleporting"));
|
||||
final User target = getPlayer(server, args, 0);
|
||||
final User toPlayer = getPlayer(server, args, 1);
|
||||
if (!target.isTeleportEnabled())
|
||||
{
|
||||
throw new Exception(_("teleportDisabled", target.getDisplayName()));
|
||||
}
|
||||
if (!toPlayer.isTeleportEnabled())
|
||||
{
|
||||
throw new Exception(_("teleportDisabled", toPlayer.getDisplayName()));
|
||||
}
|
||||
if (target.getWorld() != toPlayer.getWorld() && ess.getSettings().isWorldTeleportPermissions()
|
||||
&& !user.isAuthorized("essentials.world." + toPlayer.getWorld().getName()))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue