diff --git a/src/main/java/cc/fascinated/bat/command/BatCommand.java b/src/main/java/cc/fascinated/bat/command/BatCommand.java index b801c44..79435f7 100644 --- a/src/main/java/cc/fascinated/bat/command/BatCommand.java +++ b/src/main/java/cc/fascinated/bat/command/BatCommand.java @@ -103,6 +103,9 @@ public abstract class BatCommand { } command.setSubcommandData(new SubcommandData(command.getInfo().getName(), command.getInfo().getDescription())); + for (OptionData option : command.getCommandData().getOptions()) { + command.getSubcommandData().addOptions(option); + } commandData.addSubcommands(command.getSubcommandData()); subCommands.put(command.getInfo().getName(), command); } @@ -115,10 +118,6 @@ public abstract class BatCommand { * @param options the options to add */ protected final void addOptions(OptionData... options) { - if (subcommandData != null) { - subcommandData.addOptions(options); - } else { - commandData.addOptions(options); - } + commandData.addOptions(options); } } \ No newline at end of file