1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-28 05:54:16 +02:00

Add a config option to require a reason

This commit is contained in:
Shy
2025-05-02 16:30:14 +02:00
parent 361f66f645
commit d863622168
6 changed files with 48 additions and 20 deletions
@@ -39,6 +39,9 @@ public final class MuteCommand implements CommandProvider {
}
private int muteWithoutReason(CommandContext<CommandSourceStack> context) throws CommandSyntaxException {
if (SModerationPaper.CONFIG.shouldForceReason()){
CommandUtil.error("Please provide a reason.");
}
UUID sender = CommandUtil.getSenderUUID(context.getSource());
UUID target = context.getArgument("player", UUID.class);
long duration = context.getArgument("duration", Long.class);