From d7c9a850219338d522a9a9cd4044b38b87673e71 Mon Sep 17 00:00:00 2001 From: PikaMug Date: Thu, 18 Jul 2019 18:15:27 -0400 Subject: [PATCH] Cleanup rewards prompt --- .../quests/prompts/RewardsPrompt.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/main/src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java index 2204b1929..c77bcc982 100644 --- a/main/src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java +++ b/main/src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java @@ -54,7 +54,7 @@ public class RewardsPrompt extends FixedSetPrompt { public String getPromptText(ConversationContext context) { String text; String lang = Lang.get("rewardsTitle"); - lang = lang.replaceAll("", ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.LIGHT_PURPLE); + lang = lang.replace("", ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.LIGHT_PURPLE); text = ChatColor.LIGHT_PURPLE + lang + "\n"; if (context.getSessionData(CK.REW_MONEY) == null) { text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("rewSetMoney") + " (" + Lang.get("noneSet") + ")\n"; @@ -194,9 +194,9 @@ public class RewardsPrompt extends FixedSetPrompt { public String getPromptText(ConversationContext context) { String text = Lang.get("rewMoneyPrompt"); if (plugin.getDependencies().getVaultEconomy() != null) { - text = text.replaceAll("", ChatColor.AQUA + (plugin.getDependencies().getVaultEconomy().currencyNamePlural().isEmpty() ? Lang.get("money") : plugin.getDependencies().getVaultEconomy().currencyNamePlural()) + ChatColor.YELLOW); + text = text.replace("", ChatColor.AQUA + (plugin.getDependencies().getVaultEconomy().currencyNamePlural().isEmpty() ? Lang.get("money") : plugin.getDependencies().getVaultEconomy().currencyNamePlural()) + ChatColor.YELLOW); } else { - text = text.replaceAll("", ChatColor.AQUA + Lang.get("money") + ChatColor.YELLOW); + text = text.replace("", ChatColor.AQUA + Lang.get("money") + ChatColor.YELLOW); } return ChatColor.YELLOW + text; } @@ -414,7 +414,7 @@ public class RewardsPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { String lang1 = Lang.get("rewCommandPrompt"); - lang1 = lang1.replaceAll("", ChatColor.BOLD + "" + ChatColor.RED + "comma" + ChatColor.RESET + ChatColor.YELLOW); + lang1 = lang1.replace("", ChatColor.BOLD + "" + ChatColor.RED + "comma" + ChatColor.RESET + ChatColor.YELLOW); String lang2 = Lang.get("rewCommandPromptHint"); return ChatColor.YELLOW + lang1 + "\n" + ChatColor.GOLD + lang2; } @@ -498,7 +498,7 @@ public class RewardsPrompt extends FixedSetPrompt { String text = ChatColor.GOLD + Lang.get("mcMMORewardsTitle") + "\n"; if (context.getSessionData(CK.REW_MCMMO_SKILLS) == null) { text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("reqSetSkills") + " (" + Lang.get("noneSet") + ")\n"; - text += ChatColor.GRAY + "2 - " + Lang.get("reqSetSkillAmounts") + " (" + Lang.get("rewNoMcMMOSkills") + ")\n"; + text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("reqSetSkillAmounts") + " (" + Lang.get("rewNoMcMMOSkills") + ")\n"; text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n"; text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done"); } else { @@ -602,7 +602,7 @@ public class RewardsPrompt extends FixedSetPrompt { } } else { String text = Lang.get("reqMcMMOError"); - text = text.replaceAll("", ChatColor.LIGHT_PURPLE + s + ChatColor.RED); + text = text.replace("", ChatColor.LIGHT_PURPLE + s + ChatColor.RED); context.getForWhom().sendRawMessage(ChatColor.RED + text); return new mcMMOSkillsPrompt(); } @@ -630,7 +630,7 @@ public class RewardsPrompt extends FixedSetPrompt { amounts.add(Integer.parseInt(s)); } catch (NumberFormatException e) { String text = Lang.get("reqNotANumber"); - text = text.replaceAll("", ChatColor.LIGHT_PURPLE + s + ChatColor.RED); + text = text.replace("", ChatColor.LIGHT_PURPLE + s + ChatColor.RED); context.getForWhom().sendRawMessage(ChatColor.RED + text); return new mcMMOAmountsPrompt(); } @@ -652,7 +652,7 @@ public class RewardsPrompt extends FixedSetPrompt { String text = ChatColor.GOLD + Lang.get("heroesRewardsTitle") + "\n"; if (context.getSessionData(CK.REW_HEROES_CLASSES) == null) { text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("rewSetHeroesClasses") + " (" + Lang.get("noneSet") + ")\n"; - text += ChatColor.GRAY + "2 - " + Lang.get("rewSetHeroesAmounts") + "(" + Lang.get("rewNoHeroesClasses") + ")\n"; + text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("rewSetHeroesAmounts") + "(" + Lang.get("rewNoHeroesClasses") + ")\n"; text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n"; text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done"); } else { @@ -756,7 +756,7 @@ public class RewardsPrompt extends FixedSetPrompt { HeroClass hc = plugin.getDependencies().getHeroes().getClassManager().getClass(s); if (hc == null) { String text = Lang.get("rewHeroesInvalidClass"); - text = text.replaceAll("", ChatColor.LIGHT_PURPLE + s + ChatColor.RED); + text = text.replace("", ChatColor.LIGHT_PURPLE + s + ChatColor.RED); cc.getForWhom().sendRawMessage(ChatColor.RED + text); return new HeroesClassesPrompt(); } else { @@ -791,7 +791,7 @@ public class RewardsPrompt extends FixedSetPrompt { amounts.add(d); } catch (NumberFormatException nfe) { String text = Lang.get("reqNotANumber"); - text = text.replaceAll("", ChatColor.LIGHT_PURPLE + s + ChatColor.RED); + text = text.replace("", ChatColor.LIGHT_PURPLE + s + ChatColor.RED); cc.getForWhom().sendRawMessage(ChatColor.RED + text); return new HeroesExperiencePrompt(); } @@ -824,7 +824,7 @@ public class RewardsPrompt extends FixedSetPrompt { for (String s : arr) { if (PhatLootsAPI.getPhatLoot(s) == null) { String text = Lang.get("rewPhatLootsInvalid"); - text = text.replaceAll("", ChatColor.DARK_RED + s + ChatColor.RED); + text = text.replace("", ChatColor.DARK_RED + s + ChatColor.RED); cc.getForWhom().sendRawMessage(ChatColor.RED + text); return new PhatLootsPrompt(); } @@ -998,7 +998,7 @@ public class RewardsPrompt extends FixedSetPrompt { text += ChatColor.GOLD + descriptions.get(temp) + "\n"; } String lang = Lang.get("stageEditorCustomDataPrompt"); - lang = lang.replaceAll("", temp); + lang = lang.replace("", temp); text += ChatColor.YELLOW + lang; return text; }