add: permission

This commit is contained in:
hexlocation 2025-03-16 10:22:39 +01:00
parent 47ff4ad16f
commit 263c9644b3
Signed by: hex
GPG key ID: A19EFFAAF8C00FCF

View file

@ -29,6 +29,7 @@ public class Silencer extends JavaPlugin implements Listener {
private LiteralCommandNode<CommandSourceStack> muteCommand() {
return Commands.literal("mute")
.requires(sender -> sender.getSender().hasPermission("silencer.mute"))
.then(Commands.argument("targets", ArgumentTypes.players())
.executes(ctx -> {
final PlayerSelectorArgumentResolver targetResolver = ctx.getArgument("targets",