mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-28 21:03:05 +00:00
Deny tpahere requests to players without permission to accept (#3478)
This commit is contained in:
parent
b58c98bea0
commit
07fa87dc6a
|
@ -25,6 +25,9 @@ public class Commandtpahere 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()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue