Skip help output of choice command

This commit is contained in:
PikaMug 2022-11-23 13:46:42 -05:00
parent ee45d26a5a
commit a5429d3ede
2 changed files with 8 additions and 3 deletions

View File

@ -103,6 +103,9 @@ public class QuestsCommandHandler {
cs.sendMessage(ChatColor.GOLD + Lang.get("questHelpTitle"));
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("questDisplayHelp"));
for (final QuestsSubCommand cmd : subCommands.values()) {
if (cmd.getName().equals("choice")) {
continue;
}
cs.sendMessage(ChatColor.YELLOW + "/quests " + cmd.getDescription().replace("<command>", ChatColor.GOLD
+ (plugin.getSettings().canTranslateSubCommands() ? cmd.getNameI18N() : cmd.getName())
+ ChatColor.YELLOW));

View File

@ -44,7 +44,7 @@ public class QuestsChoiceCommand extends QuestsSubCommand {
if (assertNonPlayer(cs)) {
return;
}
Player player = (Player) cs;
final Player player = (Player) cs;
if (!cs.hasPermission(getPermission())) {
Lang.send(player, ChatColor.RED + Lang.get(player, "noPermission"));
return;
@ -56,7 +56,9 @@ public class QuestsChoiceCommand extends QuestsSubCommand {
if (args.length == 1) {
return;
}
player.acceptConversationInput(concatArgArray(args, 1, args.length - 1, ' '));
final String input = concatArgArray(args, 1, args.length - 1, ' ');
if (input != null) {
player.acceptConversationInput(input);
}
}
}