diff --git a/src/main/java/de/shiewk/smoderation/paper/command/MuteCommand.java b/src/main/java/de/shiewk/smoderation/paper/command/MuteCommand.java index cd5bfdf..e775969 100644 --- a/src/main/java/de/shiewk/smoderation/paper/command/MuteCommand.java +++ b/src/main/java/de/shiewk/smoderation/paper/command/MuteCommand.java @@ -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 { diff --git a/src/main/resources/smoderation/translations/en_us.json b/src/main/resources/smoderation/translations/en_us.json index 950efab..75bbf42 100644 --- a/src/main/resources/smoderation/translations/en_us.json +++ b/src/main/resources/smoderation/translations/en_us.json @@ -24,6 +24,7 @@ "smod.command.mute.fail.forceReason": "Please provide a reason.", "smod.command.mute.fail.protect": "This player can't be muted.", "smod.command.mute.fail.self": "You can't mute yourself.", + "smod.command.mute.fail.tooShort": "You can't mute a player for less than 1ms.", "smod.command.offlinetp.fail.unknown": "This player's location is unknown.", "smod.command.offlinetp.teleporting": "Teleporting you to .", "smod.command.socialspy.disabled": "SocialSpy disabled.",