mirror of
https://github.com/Shiewk/SModeration.git
synced 2026-04-28 05:54:16 +02:00
Make the mute command require a positive duration
This commit is contained in:
@@ -59,6 +59,9 @@ public final class MuteCommand implements CommandProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void executeMute(UUID sender, UUID target, long duration, String reason) throws CommandSyntaxException {
|
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)) {
|
if (sender.equals(target)) {
|
||||||
CommandUtil.errorTranslatable("smod.command.mute.fail.self");
|
CommandUtil.errorTranslatable("smod.command.mute.fail.self");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
"smod.command.mute.fail.forceReason": "Please provide a reason.",
|
"smod.command.mute.fail.forceReason": "Please provide a reason.",
|
||||||
"smod.command.mute.fail.protect": "This player can't be muted.",
|
"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.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.fail.unknown": "This player's location is unknown.",
|
||||||
"smod.command.offlinetp.teleporting": "<prefix>Teleporting you to <secondary><arg:0></secondary>.",
|
"smod.command.offlinetp.teleporting": "<prefix>Teleporting you to <secondary><arg:0></secondary>.",
|
||||||
"smod.command.socialspy.disabled": "<prefix>SocialSpy <red>disabled</red>.",
|
"smod.command.socialspy.disabled": "<prefix>SocialSpy <red>disabled</red>.",
|
||||||
|
|||||||
Reference in New Issue
Block a user