diff --git a/build-number.txt b/build-number.txt index 018fa277..5ba2c9b7 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -2683 \ No newline at end of file +2684 \ No newline at end of file diff --git a/src/main/java/me/chayapak1/chomens_bot/commands/MusicCommand.java b/src/main/java/me/chayapak1/chomens_bot/commands/MusicCommand.java index 671dbca8..a9f1ceaa 100644 --- a/src/main/java/me/chayapak1/chomens_bot/commands/MusicCommand.java +++ b/src/main/java/me/chayapak1/chomens_bot/commands/MusicCommand.java @@ -439,6 +439,7 @@ public class MusicCommand extends Command { final float speed = context.getFloat(true, false); if (speed > 5) throw new CommandException(Component.text("Too fast!")); + else if (speed < 0) throw new CommandException(Component.text("Invalid speed")); long oldTime = -1; @@ -477,6 +478,7 @@ public class MusicCommand extends Command { final int amplify = context.getInteger(true); if (amplify > 8) throw new CommandException(Component.text("Too big value")); + else if (amplify < 0) throw new CommandException(Component.text("Invalid amplification value")); bot.music.amplify = amplify;