Fixed "yes" and "no" not being translated

When accepting a task, the prompts "yes" and "no" are not translated.
This commit is contained in:
apachezy 2020-01-12 03:18:08 +08:00 committed by GitHub
parent 6eeb4ad032
commit 636bb0a4e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -392,9 +392,9 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
player.sendMessage(ChatColor.YELLOW + Lang.get("cancelled")); player.sendMessage(ChatColor.YELLOW + Lang.get("cancelled"));
return Prompt.END_OF_CONVERSATION; return Prompt.END_OF_CONVERSATION;
} else { } else {
String msg = Lang.get("questInvalidChoice"); String msg = Lang.get(player, "questInvalidChoice")
msg.replace("<yes>", Lang.get(player, "yesWord")); .replace("<yes>", Lang.get(player, "yesWord"))
msg.replace("<no>", Lang.get(player, "noWord")); .replace("<no>", Lang.get(player, "noWord"));
player.sendMessage(ChatColor.RED + msg); player.sendMessage(ChatColor.RED + msg);
return new QuestAcceptPrompt(); return new QuestAcceptPrompt();
} }