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:
KHobbits 2012-03-17 06:08:06 +00:00
parent e4ce814c2f
commit 762105d692
12 changed files with 20 additions and 16 deletions

View file

@ -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()));
}
}