mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-03 22:08:28 +00:00
Deny teleport requests to players lacking permission to accept (#3361)
This PR will deny any teleport requests to players lacking permission to accept the request (`essentials.tpaccept`). Closes #1259.
This commit is contained in:
parent
3d096c1f31
commit
3e5bd4cf09
2 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,9 @@ public class Commandtpa extends EssentialsCommand {
|
|||
if (user.getName().equalsIgnoreCase(player.getName())) {
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
if (!player.isAuthorized("essentials.tpaccept")) {
|
||||
throw new Exception(tl("teleportNoAcceptPermission", player.getDisplayName()));
|
||||
}
|
||||
if (!player.isTeleportEnabled()) {
|
||||
throw new Exception(tl("teleportDisabled", player.getDisplayName()));
|
||||
}
|
||||
|
|
|
@ -538,6 +538,7 @@ teleportHome=\u00a76Teleporting to \u00a7c{0}\u00a76.
|
|||
teleporting=\u00a76Teleporting...
|
||||
teleportInvalidLocation=Value of coordinates cannot be over 30000000
|
||||
teleportNewPlayerError=\u00a74Failed to teleport new player\!
|
||||
teleportNoAcceptPermission=\u00a7c{0} \u00a74does not have permission to accept teleport requests.
|
||||
teleportRequest=\u00a7c{0}\u00a76 has requested to teleport to you.
|
||||
teleportRequestAllCancelled=\u00a76All outstanding teleport requests cancelled.
|
||||
teleportRequestCancelled=\u00a76Your teleport request to \u00a7c{0}\u00a76 was cancelled.
|
||||
|
|
Loading…
Reference in a new issue