lazily fix these 2 commands

This commit is contained in:
Chayapak 2023-06-23 19:26:23 +07:00
parent 9cd3766ebc
commit 3246702fb4
2 changed files with 4 additions and 0 deletions

View file

@ -58,6 +58,8 @@ public class MailCommand implements Command {
}
public Component execute(CommandContext context, String[] args, String[] fullArgs) {
if (args.length < 1) return Component.text("Not enough arguments").color(NamedTextColor.RED);
final Bot bot = context.bot();
final MutablePlayerListEntry sender = context.sender();

View file

@ -62,6 +62,8 @@ public class MusicCommand implements Command {
}
public Component execute(CommandContext context, String[] args, String[] fullArgs) {
if (args.length < 1) return Component.text("Not enough arguments").color(NamedTextColor.RED);
root = Path.of(MusicPlayerPlugin.SONG_DIR.getPath());
return switch (args[0]) {
case "play", "playurl", "playnbs", "playnbsurl" -> play(context, args);