Skip to content

Commit

Permalink
Skip help output of choice command
Browse files Browse the repository at this point in the history
  • Loading branch information
PikaMug committed Nov 23, 2022
1 parent ee45d26 commit a5429d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ private void printHelp(final CommandSender cs) {
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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void execute(CommandSender cs, String[] args) {
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;
Expand All @@ -56,7 +56,9 @@ public void execute(CommandSender cs, String[] args) {
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);
}
}

}

0 comments on commit a5429d3

Please sign in to comment.