actually remove no song is currently playing

This commit is contained in:
Chayapak 2023-05-11 10:33:37 +07:00
parent 9a0261ccad
commit eb78e8de5c

View file

@ -266,12 +266,9 @@ public class MusicCommand {
return 1; return 1;
} }
public int pitch (CommandContext<CommandSource> context) throws CommandSyntaxException { public int pitch (CommandContext<CommandSource> context) {
final CommandSource source = context.getSource(); final CommandSource source = context.getSource();
final SongPlayer songPlayer = source.client().songPlayer(); final SongPlayer songPlayer = source.client().songPlayer();
final Song currentSong = songPlayer.currentSong();
if (currentSong == null) throw NO_SONG_IS_CURRENTLY_PLAYING.create();
final float pitch = getFloat(context, "pitch"); final float pitch = getFloat(context, "pitch");