1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-29 06:34:17 +02:00

Make the mute command require a positive duration

This commit is contained in:
Shy
2025-08-24 11:38:21 +02:00
parent c4953d2acb
commit 7826c4e75a
2 changed files with 4 additions and 0 deletions
@@ -59,6 +59,9 @@ public final class MuteCommand implements CommandProvider {
}
public static void executeMute(UUID sender, UUID target, long duration, String reason) throws CommandSyntaxException {
if (duration == 0){
CommandUtil.errorTranslatable("smod.command.mute.fail.tooShort");
}
if (sender.equals(target)) {
CommandUtil.errorTranslatable("smod.command.mute.fail.self");
} else {