mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-18 11:45:07 +08: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 New Issue
Block a user