diff --git a/src/main/java/me/blackvein/quests/EventFactory.java b/src/main/java/me/blackvein/quests/EventFactory.java index 84b5adeae..b0857368d 100644 --- a/src/main/java/me/blackvein/quests/EventFactory.java +++ b/src/main/java/me/blackvein/quests/EventFactory.java @@ -282,7 +282,7 @@ public class EventFactory implements ConversationAbandonedListener { text += ChatColor.AQUA + evt.name + ChatColor.YELLOW + ", "; } text = text.substring(0, text.length() - 2) + "\n"; - text += ChatColor.YELLOW + Lang.get("eventEditorEnterEventName"); + text += ChatColor.YELLOW + Lang.get("eventEditorEnterEventName") + Lang.orCancelToReturn; return text; } @@ -314,7 +314,7 @@ public class EventFactory implements ConversationAbandonedListener { text += ChatColor.AQUA + evt.name + ChatColor.YELLOW + ","; } text = text.substring(0, text.length() - 1) + "\n"; - text += ChatColor.YELLOW + Lang.get("eventEditorEnterEventName"); + text += ChatColor.YELLOW + Lang.get("eventEditorEnterEventName") + Lang.orCancelToReturn; return text; } @@ -904,7 +904,8 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - String text = ChatColor.AQUA + Lang.get("eventEditorCreate") + ChatColor.GOLD + " - " + Lang.get("eventEditorEnterEventName"); + String text = ChatColor.AQUA + Lang.get("eventEditorCreate") + ChatColor.GOLD + " - " + + Lang.get("eventEditorEnterEventName") + Lang.orCancelToReturn; return text; } @@ -959,7 +960,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("eventEditorExplosionPrompt"); + return ChatColor.YELLOW + Lang.get("eventEditorExplosionPrompt") + Lang.orCancelToReturn; } @SuppressWarnings("unchecked") @@ -1001,7 +1002,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("eventEditorEnterEventName"); + return ChatColor.YELLOW + Lang.get("eventEditorEnterEventName") + Lang.orCancelToReturn; } @Override @@ -1033,7 +1034,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("eventEditorSetMessagePrompt"); + return ChatColor.YELLOW + Lang.get("eventEditorSetMessagePrompt") + "(" + Lang.orCancelToReturn + ")"; } @Override @@ -1193,7 +1194,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("eventEditorEffectLocationPrompt"); + return ChatColor.YELLOW + Lang.get("eventEditorEffectLocationPrompt") + Lang.orCancelToReturn; } @SuppressWarnings("unchecked") @@ -1242,7 +1243,7 @@ public class EventFactory implements ConversationAbandonedListener { effects += ChatColor.DARK_PURPLE + "GHAST_SHRIEK " + ChatColor.GRAY + "- " + Lang.get("effGhastShriek") + "\n"; effects += ChatColor.DARK_PURPLE + "ZOMBIE_CHEW_IRON_DOOR " + ChatColor.GRAY + "- " + Lang.get("effZombieWood") + "\n"; effects += ChatColor.DARK_PURPLE + "ZOMBIE_CHEW_WOODEN_DOOR " + ChatColor.GRAY + "- " + Lang.get("effZombieIron") + "\n"; - return ChatColor.YELLOW + effects + Lang.get("effEnterName"); + return ChatColor.YELLOW + effects + Lang.get("effEnterName") + Lang.orCancelToReturn; } @SuppressWarnings("unchecked") @@ -1337,7 +1338,7 @@ public class EventFactory implements ConversationAbandonedListener { effects += w.getName() + ", "; } effects = effects.substring(0, effects.length()); - return ChatColor.YELLOW + effects + Lang.get("eventEditorEnterStormWorld"); + return ChatColor.YELLOW + effects + Lang.get("eventEditorEnterStormWorld") + Lang.orCancelToReturn; } @Override @@ -1438,7 +1439,7 @@ public class EventFactory implements ConversationAbandonedListener { effects += w.getName() + ", "; } effects = effects.substring(0, effects.length()); - return ChatColor.YELLOW + effects + Lang.get("eventEditorEnterThunderWorld"); + return ChatColor.YELLOW + effects + Lang.get("eventEditorEnterThunderWorld") + Lang.orCancelToReturn; } @Override @@ -1665,7 +1666,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - String text = ChatColor.YELLOW + Lang.get("eventEditorSetMobNamePrompt"); + String text = ChatColor.YELLOW + Lang.get("eventEditorSetMobNamePrompt") + Lang.orCancelToReturn; return text; } @@ -1709,7 +1710,7 @@ public class EventFactory implements ConversationAbandonedListener { mobs += MiscUtil.getProperMobName(mobArr[i]) + "\n"; } } - return mobs + ChatColor.YELLOW + Lang.get("eventEditorSetMobTypesPrompt"); + return mobs + ChatColor.YELLOW + Lang.get("eventEditorSetMobTypesPrompt") + Lang.orCancelToReturn; } @Override @@ -1739,7 +1740,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("eventEditorSetMobAmountsPrompt"); + return ChatColor.YELLOW + Lang.get("eventEditorSetMobAmountsPrompt") + Lang.orCancelToReturn; } @Override @@ -1775,7 +1776,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("eventEditorSetMobLocationPrompt"); + return ChatColor.YELLOW + Lang.get("eventEditorSetMobLocationPrompt") + Lang.orCancelToReturn; } @Override @@ -1844,7 +1845,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("eventEditorLightningPrompt"); + return ChatColor.YELLOW + Lang.get("eventEditorLightningPrompt") + Lang.orCancelToReturn; } @SuppressWarnings("unchecked") @@ -1992,7 +1993,7 @@ public class EventFactory implements ConversationAbandonedListener { for (PotionEffectType pet : PotionEffectType.values()) { effs += (pet != null && pet.getName() != null) ? (ChatColor.DARK_PURPLE + pet.getName() + "\n") : ""; } - return effs + ChatColor.YELLOW + Lang.get("eventEditorSetPotionEffectsPrompt"); + return effs + ChatColor.YELLOW + Lang.get("eventEditorSetPotionEffectsPrompt") + Lang.orCancelToReturn; } @Override @@ -2018,7 +2019,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("eventEditorSetPotionDurationsPrompt"); + return ChatColor.YELLOW + Lang.get("eventEditorSetPotionDurationsPrompt") + Lang.orCancelToReturn; } @Override @@ -2050,7 +2051,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("eventEditorSetPotionMagnitudesPrompt"); + return ChatColor.YELLOW + Lang.get("eventEditorSetPotionMagnitudesPrompt") + Lang.orCancelToReturn; } @Override @@ -2150,7 +2151,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("eventEditorSetTeleportPrompt"); + return ChatColor.YELLOW + Lang.get("eventEditorSetTeleportPrompt") + Lang.orCancelToReturn; } @Override @@ -2185,7 +2186,7 @@ public class EventFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { String text = ChatColor.GOLD + "" + ChatColor.ITALIC + Lang.get("eventEditorCommandsNote"); - return ChatColor.YELLOW + Lang.get("eventEditorSetCommandsPrompt") + "\n" + text; + return ChatColor.YELLOW + Lang.get("eventEditorSetCommandsPrompt") + Lang.orCancelToReturn + "\n" + text; } @Override diff --git a/src/main/java/me/blackvein/quests/QuestFactory.java b/src/main/java/me/blackvein/quests/QuestFactory.java index 00d93e4a8..66da71eb8 100644 --- a/src/main/java/me/blackvein/quests/QuestFactory.java +++ b/src/main/java/me/blackvein/quests/QuestFactory.java @@ -351,7 +351,7 @@ public class QuestFactory implements ConversationAbandonedListener { for (Quest q : quests.getQuests()) { s += ChatColor.GRAY + "- " + ChatColor.YELLOW + q.getName() + "\n"; } - return s + ChatColor.GOLD + Lang.get("questEditorEditEnterQuestName"); + return s + ChatColor.GOLD + Lang.get("questEditorEditEnterQuestName") + " (" + Lang.orCancelToReturn + ")"; } @Override @@ -387,7 +387,8 @@ public class QuestFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { String text = ChatColor.GOLD + Lang.get("questCreateTitle") + "\n"; - text += ChatColor.AQUA + Lang.get("questEditorCreate") + " " + ChatColor.GOLD + "- " + Lang.get("questEditorEnterQuestName"); + text += ChatColor.AQUA + Lang.get("questEditorCreate") + " " + ChatColor.GOLD + "- " + + Lang.get("questEditorEnterQuestName") + " (" + Lang.orCancelToReturn + ")"; return text; } @@ -453,7 +454,7 @@ public class QuestFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("questEditorEnterBlockStart"); + return ChatColor.YELLOW + Lang.get("questEditorEnterBlockStart") + Lang.orCancelToReturn; } @Override @@ -487,7 +488,7 @@ public class QuestFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("questEditorEnterQuestName"); + return ChatColor.YELLOW + Lang.get("questEditorEnterQuestName") + " (" + Lang.orCancelToReturn + ")"; } @Override @@ -525,7 +526,7 @@ public class QuestFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("questEditorEnterAskMessage"); + return ChatColor.YELLOW + Lang.get("questEditorEnterAskMessage") + " (" + Lang.orCancelToReturn + ")"; } @Override @@ -547,7 +548,7 @@ public class QuestFactory implements ConversationAbandonedListener { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("questEditorEnterFinishMessage"); + return ChatColor.YELLOW + Lang.get("questEditorEnterFinishMessage") + " (" + Lang.orCancelToReturn + ")"; } @Override @@ -577,7 +578,7 @@ public class QuestFactory implements ConversationAbandonedListener { text += ChatColor.GREEN + "- " + e.getName() + "\n"; } } - return text + ChatColor.YELLOW + Lang.get("questEditorEnterInitialEvent"); + return text + ChatColor.YELLOW + Lang.get("questEditorEnterInitialEvent" + Lang.orCancelToReturn); } @Override @@ -681,7 +682,7 @@ public class QuestFactory implements ConversationAbandonedListener { } else { text += ChatColor.GRAY + "(" + Lang.get("none") + ")\n\n"; } - return text + ChatColor.YELLOW + Lang.get("questWGPrompt"); + return text + ChatColor.YELLOW + Lang.get("questWGPrompt") + Lang.orCancelToReturn; } @Override @@ -800,7 +801,8 @@ public class QuestFactory implements ConversationAbandonedListener { } quests.updateData(); } - context.getForWhom().sendRawMessage(ChatColor.BOLD + Lang.get("questEditorSaved")); + context.getForWhom().sendRawMessage(ChatColor.GREEN + + Lang.get("questEditorSaved").replaceAll("", "/questadmin " + Lang.get("COMMAND_QUESTADMIN_RELOAD"))); } catch (IOException e) { e.printStackTrace(); } catch (InvalidConfigurationException e) { diff --git a/src/main/java/me/blackvein/quests/Quests.java b/src/main/java/me/blackvein/quests/Quests.java index 20a63c6b2..3b16ed0ef 100644 --- a/src/main/java/me/blackvein/quests/Quests.java +++ b/src/main/java/me/blackvein/quests/Quests.java @@ -1956,7 +1956,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener if ((quests.size() + rows) < ((page * rows)) || quests.size() == 0) { player.sendMessage(ChatColor.YELLOW + Lang.get("pageNotExist")); } else { - player.sendMessage(ChatColor.GOLD + Lang.get("questsTitle")); + player.sendMessage(ChatColor.GOLD + Lang.get("questListTitle")); int fromOrder = (page - 1) * rows; List subQuests; diff --git a/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java b/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java index 6bce1a31c..cc35801da 100644 --- a/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java +++ b/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java @@ -289,9 +289,9 @@ public class CreateStagePrompt extends FixedSetPrompt { text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "23 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- " + Lang.get("stageEditorCompleteMessage") + ChatColor.GRAY + "(" + ChatColor.AQUA + "\"" + context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) + "\"" + ChatColor.GRAY + ")\n"; } if (context.getSessionData(pref + CK.S_OVERRIDE_DISPLAY) == null) { - text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "24 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- " + Lang.get("stageObjectiveOverride") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n"; + text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "24 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- " + Lang.get("stageEditorObjectiveOverride") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n"; } else { - text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "24 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- " + Lang.get("stageObjectiveOverride") + ChatColor.GRAY + "(" + ChatColor.DARK_AQUA + "\"" + context.getSessionData(pref + CK.S_OVERRIDE_DISPLAY) + "\"" + ChatColor.GRAY + ")\n"; + text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "24 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- " + Lang.get("stageEditorObjectiveOverride") + ChatColor.GRAY + "(" + ChatColor.DARK_AQUA + "\"" + context.getSessionData(pref + CK.S_OVERRIDE_DISPLAY) + "\"" + ChatColor.GRAY + ")\n"; } text += ChatColor.RED + "" + ChatColor.BOLD + "25 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- " + Lang.get("stageEditorDelete") + "\n"; text += ChatColor.GREEN + "" + ChatColor.BOLD + "26 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- " + Lang.get("done") + "\n"; @@ -481,7 +481,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - String text = ChatColor.YELLOW + Lang.get("stageEditorPasswordDisplayPrompt") + "\n"; + String text = ChatColor.YELLOW + Lang.get("stageEditorPasswordDisplayPrompt") + Lang.orCancelToReturn + "\n"; text += ChatColor.ITALIC + "" + ChatColor.GOLD + Lang.get("stageEditorPasswordDisplayHint"); return text; } @@ -508,7 +508,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - String text = ChatColor.YELLOW + Lang.get("stageEditorPasswordPhrasePrompt") + "\n"; + String text = ChatColor.YELLOW + Lang.get("stageEditorPasswordPhrasePrompt") + Lang.orCancelToReturn + "\n"; text += ChatColor.ITALIC + "" + ChatColor.GOLD + Lang.get("stageEditorPasswordPhraseHint1") + "\n"; text += ChatColor.RESET + "" + ChatColor.YELLOW + Lang.get("stageEditorPasswordPhraseHint2"); return text; @@ -540,7 +540,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - String text = ChatColor.YELLOW + Lang.get("stageEditorObjectiveOverridePrompt") + "\n"; + String text = ChatColor.YELLOW + Lang.get("stageEditorObjectiveOverridePrompt") + Lang.orCancelToReturn + "\n"; text += ChatColor.ITALIC + "" + ChatColor.GOLD + Lang.get("stageEditorObjectiveOverrideHint"); return text; } @@ -680,7 +680,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorEnterBlockNames"); + return ChatColor.YELLOW + Lang.get("stageEditorEnterBlockNames") + Lang.orCancelToReturn; } @Override @@ -716,7 +716,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorBreakBlocksPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorBreakBlocksPrompt") + Lang.orCancelToReturn; } @Override @@ -747,7 +747,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorEnterBlockDurability"); + return ChatColor.YELLOW + Lang.get("stageEditorEnterBlockDurability") + Lang.orCancelToReturn; } @Override @@ -933,7 +933,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorDamageBlocksPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorDamageBlocksPrompt") + Lang.orCancelToReturn; } @Override @@ -1150,7 +1150,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorPlaceBlocksPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorPlaceBlocksPrompt") + Lang.orCancelToReturn; } @Override @@ -1367,7 +1367,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorUseBlocksPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorUseBlocksPrompt") + Lang.orCancelToReturn; } @Override @@ -1584,7 +1584,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorCutBlocksPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorCutBlocksPrompt") + Lang.orCancelToReturn; } @Override @@ -1809,7 +1809,7 @@ public class CreateStagePrompt extends FixedSetPrompt { text += ChatColor.GREEN + Quester.prettyEnchantmentString(e) + ", "; } text = text.substring(0, text.length() - 1); - return text + "\n" + ChatColor.YELLOW + Lang.get("stageEditorEnchantTypePrompt"); + return text + "\n" + ChatColor.YELLOW + Lang.get("stageEditorEnchantTypePrompt") + Lang.orCancelToReturn; } @Override @@ -1848,7 +1848,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorItemNamesPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorItemNamesPrompt") + Lang.orCancelToReturn; } @Override @@ -1884,7 +1884,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorEnchantAmountsPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorEnchantAmountsPrompt") + Lang.orCancelToReturn; } @Override @@ -2042,7 +2042,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { questFactory.selectingNPCs.add((Player) context.getForWhom()); - return ChatColor.YELLOW + Lang.get("stageEditorNPCPrompt") + "\n" + ChatColor.GOLD + Lang.get("npcHint"); + return ChatColor.YELLOW + Lang.get("stageEditorNPCPrompt") + Lang.orCancelToReturn + "\n" + ChatColor.GOLD + Lang.get("npcHint"); } @Override @@ -2076,7 +2076,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { String note = ChatColor.GOLD + Lang.get("stageEditorNPCNote"); - return ChatColor.YELLOW + Lang.get("stageEditorDeliveryMessagesPrompt") + "\n" + note; + return ChatColor.YELLOW + Lang.get("stageEditorDeliveryMessagesPrompt") + Lang.orCancelToReturn + "\n" + note; } @Override @@ -2096,7 +2096,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { questFactory.selectingNPCs.add((Player) context.getForWhom()); - return ChatColor.YELLOW + Lang.get("stageEditorNPCToTalkToPrompt") + "\n" + ChatColor.GOLD + Lang.get("npcHint"); + return ChatColor.YELLOW + Lang.get("stageEditorNPCToTalkToPrompt") + Lang.orCancelToReturn + "\n" + ChatColor.GOLD + Lang.get("npcHint"); } @Override @@ -2216,7 +2216,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { questFactory.selectingNPCs.add((Player) context.getForWhom()); - return ChatColor.YELLOW + Lang.get("stageEditorNPCPrompt") + "\n" + ChatColor.GOLD + Lang.get("npcHint"); + return ChatColor.YELLOW + Lang.get("stageEditorNPCPrompt") + Lang.orCancelToReturn + "\n" + ChatColor.GOLD + Lang.get("npcHint"); } @Override @@ -2249,7 +2249,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorKillNPCsPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorKillNPCsPrompt") + Lang.orCancelToReturn; } @Override @@ -2479,7 +2479,7 @@ public class CreateStagePrompt extends FixedSetPrompt { mobs += MiscUtil.getProperMobName(mobArr.get(i)) + "\n"; } } - return mobs + ChatColor.YELLOW + Lang.get("stageEditorMobsPrompt"); + return mobs + ChatColor.YELLOW + Lang.get("stageEditorMobsPrompt") + Lang.orCancelToReturn; } @Override @@ -2505,7 +2505,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorMobAmountsPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorMobAmountsPrompt") + Lang.orCancelToReturn; } @Override @@ -2536,7 +2536,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorMobLocationPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorMobLocationPrompt") + Lang.orCancelToReturn; } @SuppressWarnings("unchecked") @@ -2574,7 +2574,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorMobLocationRadiiPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorMobLocationRadiiPrompt") + Lang.orCancelToReturn; } @Override @@ -2605,7 +2605,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorMobLocationNamesPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorMobLocationNamesPrompt") + Lang.orCancelToReturn; } @Override @@ -2737,7 +2737,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorReachLocationPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorReachLocationPrompt") + Lang.orCancelToReturn; } @SuppressWarnings("unchecked") @@ -2775,7 +2775,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorReachLocationRadiiPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorReachLocationRadiiPrompt") + Lang.orCancelToReturn; } @Override @@ -2806,7 +2806,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorReachLocationNamesPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorReachLocationNamesPrompt") + Lang.orCancelToReturn; } @Override @@ -2947,7 +2947,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorTameAmountsPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorTameAmountsPrompt") + Lang.orCancelToReturn; } @Override @@ -3071,7 +3071,7 @@ public class CreateStagePrompt extends FixedSetPrompt { cols += Quests.getDyeString(colArr[i]) + "\n"; } } - return cols + ChatColor.YELLOW + Lang.get("stageEditorShearColorsPrompt"); + return cols + ChatColor.YELLOW + Lang.get("stageEditorShearColorsPrompt") + Lang.orCancelToReturn; } @Override @@ -3097,7 +3097,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorShearAmountsPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorShearAmountsPrompt") + Lang.orCancelToReturn; } @Override @@ -3212,7 +3212,7 @@ public class CreateStagePrompt extends FixedSetPrompt { text += ChatColor.GREEN + "- " + e.getName() + "\n"; } } - return text + ChatColor.YELLOW + Lang.get("stageEditorEventsPrompt"); + return text + ChatColor.YELLOW + Lang.get("stageEditorEventsPrompt") + Lang.orCancelToReturn; } @Override @@ -3257,7 +3257,7 @@ public class CreateStagePrompt extends FixedSetPrompt { text += ChatColor.GREEN + "- " + e.getName() + "\n"; } } - return text + ChatColor.YELLOW + Lang.get("stageEditorEventsPrompt"); + return text + ChatColor.YELLOW + Lang.get("stageEditorEventsPrompt") + Lang.orCancelToReturn; } @Override @@ -3302,7 +3302,7 @@ public class CreateStagePrompt extends FixedSetPrompt { text += ChatColor.GREEN + "- " + e.getName() + "\n"; } } - return text + ChatColor.YELLOW + Lang.get("stageEditorEventsPrompt"); + return text + ChatColor.YELLOW + Lang.get("stageEditorEventsPrompt") + Lang.orCancelToReturn; } @Override @@ -3347,7 +3347,7 @@ public class CreateStagePrompt extends FixedSetPrompt { text += ChatColor.GREEN + "- " + e.getName() + "\n"; } } - return text + ChatColor.YELLOW + Lang.get("stageEditorEventsPrompt"); + return text + ChatColor.YELLOW + Lang.get("stageEditorEventsPrompt") + Lang.orCancelToReturn; } @Override @@ -3392,7 +3392,7 @@ public class CreateStagePrompt extends FixedSetPrompt { text += ChatColor.GREEN + "- " + e.getName() + "\n"; } } - return text + ChatColor.YELLOW + Lang.get("stageEditorChatEventsPrompt"); + return text + ChatColor.YELLOW + Lang.get("stageEditorChatEventsPrompt") + Lang.orCancelToReturn; } @Override @@ -3432,7 +3432,7 @@ public class CreateStagePrompt extends FixedSetPrompt { public String getPromptText(ConversationContext context) { String tempEvent = (String) context.getSessionData(pref + CK.S_CHAT_TEMP_EVENT); String text = ChatColor.GOLD + "- " + Lang.get("stageEditorChatTrigger") + " -\n"; - text += ChatColor.YELLOW + Lang.get("stageEditorChatEventsTriggerPromptA") + " " + ChatColor.AQUA + tempEvent + " " + ChatColor.YELLOW + Lang.get("stageEditorChatEventsTriggerPromptB"); + text += ChatColor.YELLOW + Lang.get("stageEditorChatEventsTriggerPrompt") + " " + ChatColor.AQUA + tempEvent + " " + ChatColor.YELLOW + Lang.orCancelToReturn; return text; } @@ -3479,7 +3479,7 @@ public class CreateStagePrompt extends FixedSetPrompt { text += ChatColor.GREEN + "- " + e.getName() + "\n"; } } - return text + ChatColor.YELLOW + Lang.get("stageEditorCommandEventsPrompt"); + return text + ChatColor.YELLOW + Lang.get("stageEditorCommandEventsPrompt") + Lang.orCancelToReturn; } @Override @@ -3519,7 +3519,7 @@ public class CreateStagePrompt extends FixedSetPrompt { public String getPromptText(ConversationContext context) { String tempEvent = (String) context.getSessionData(pref + CK.S_COMMAND_TEMP_EVENT); String text = ChatColor.GOLD + "- " + Lang.get("stageEditorCommandTrigger") + " -\n"; - text += ChatColor.YELLOW + Lang.get("stageEditorCommandEventsTriggerPromptA") + " " + ChatColor.AQUA + tempEvent + " " + ChatColor.YELLOW + Lang.get("stageEditorCommandEventsTriggerPromptB"); + text += ChatColor.YELLOW + Lang.get("stageEditorCommandEventsTriggerPrompt") + " " + ChatColor.AQUA + tempEvent + " " + ChatColor.YELLOW + Lang.orCancelToReturn; return text; } @@ -3558,7 +3558,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorDelayPrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorDelayPrompt") + Lang.orCancelToReturn; } @Override @@ -3624,7 +3624,7 @@ public class CreateStagePrompt extends FixedSetPrompt { for (String s : ScriptRegistry._getScriptNames()) { text += ChatColor.AQUA + "- " + s + "\n"; } - return text + ChatColor.YELLOW + Lang.get("stageEditorScriptPrompt"); + return text + ChatColor.YELLOW + Lang.get("stageEditorScriptPrompt") + Lang.orCancelToReturn; } @Override @@ -3677,7 +3677,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorStartMessagePrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorStartMessagePrompt") + Lang.orCancelToReturn; } @Override @@ -3700,7 +3700,7 @@ public class CreateStagePrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("stageEditorCompleteMessagePrompt"); + return ChatColor.YELLOW + Lang.get("stageEditorCompleteMessagePrompt") + Lang.orCancelToReturn; } @Override @@ -3725,13 +3725,13 @@ public class CreateStagePrompt extends FixedSetPrompt { public String getPromptText(ConversationContext context) { String text = ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorCustom") + " -\n"; if (questFactory.quests.customObjectives.isEmpty()) { - text += ChatColor.BOLD + "" + ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ")"; + text += ChatColor.BOLD + "" + ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ") "; } else { for (CustomObjective co : questFactory.quests.customObjectives) { text += ChatColor.DARK_PURPLE + " - " + co.getName() + "\n"; } } - return text + ChatColor.YELLOW + Lang.get("stageEditorCustomPrompt"); + return text + ChatColor.YELLOW + Lang.get("stageEditorCustomPrompt") + Lang.orCancelToReturn; } @SuppressWarnings("unchecked") diff --git a/src/main/java/me/blackvein/quests/prompts/ItemStackPrompt.java b/src/main/java/me/blackvein/quests/prompts/ItemStackPrompt.java index 57d57f663..4cf8ef7f5 100644 --- a/src/main/java/me/blackvein/quests/prompts/ItemStackPrompt.java +++ b/src/main/java/me/blackvein/quests/prompts/ItemStackPrompt.java @@ -217,7 +217,7 @@ public class ItemStackPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext cc) { - return ChatColor.YELLOW + Lang.get("itemCreateEnterName"); + return ChatColor.YELLOW + Lang.get("itemCreateEnterName") + Lang.orCancelToReturn; } @Override @@ -259,7 +259,7 @@ public class ItemStackPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext cc) { - return ChatColor.YELLOW + Lang.get("itemCreateEnterAmount"); + return ChatColor.YELLOW + Lang.get("itemCreateEnterAmount") + Lang.orCancelToReturn; } @Override @@ -288,7 +288,7 @@ public class ItemStackPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext cc) { - return ChatColor.YELLOW + Lang.get("itemCreateEnterDurab"); + return ChatColor.YELLOW + Lang.get("itemCreateEnterDurab") + Lang.orCancelToReturn; } @Override @@ -323,7 +323,7 @@ public class ItemStackPrompt extends FixedSetPrompt { text += ChatColor.GREEN + Quester.prettyEnchantmentString(e) + ", "; } text = text.substring(0, text.length() - 2); - return text + "\n" + ChatColor.YELLOW + Lang.get("itemCreateEnterEnch"); + return text + "\n" + ChatColor.YELLOW + Lang.get("itemCreateEnterEnch") + Lang.orCancelToReturn; } @Override @@ -390,7 +390,7 @@ public class ItemStackPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext cc) { - return ChatColor.YELLOW + Lang.get("itemCreateEnterName"); + return ChatColor.YELLOW + Lang.get("itemCreateEnterDisplay") + Lang.orCancelToReturn; } @Override @@ -409,7 +409,7 @@ public class ItemStackPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext cc) { - return ChatColor.YELLOW + Lang.get("itemCreateEnterLore"); + return ChatColor.YELLOW + Lang.get("itemCreateEnterLore") + Lang.orCancelToReturn; } @Override diff --git a/src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java b/src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java index e86599baa..698163fc7 100644 --- a/src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java +++ b/src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java @@ -249,7 +249,7 @@ public class RequirementsPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - String text = ChatColor.LIGHT_PURPLE + Lang.get("questListTitle") + "\n" + ChatColor.DARK_PURPLE; + String text = ChatColor.LIGHT_PURPLE + Lang.get("reqQuestListTitle") + "\n" + ChatColor.DARK_PURPLE; boolean none = true; for (Quest q : quests.getQuests()) { text += q.getName() + ", "; @@ -261,7 +261,7 @@ public class RequirementsPrompt extends FixedSetPrompt { text = text.substring(0, (text.length() - 2)); text += "\n"; } - String lang = Lang.get("reqQuestPrompt"); + String lang = Lang.get("reqQuestPrompt") + Lang.orCancelToReturn; lang = lang.replaceAll("", ChatColor.RED + "" + ChatColor.BOLD + Lang.get("comma") + ChatColor.RESET + ChatColor.YELLOW); text += ChatColor.YELLOW + lang; return text; @@ -410,7 +410,7 @@ public class RequirementsPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("reqRemoveItemsPrompt"); + return ChatColor.YELLOW + Lang.get("reqRemoveItemsPrompt") + Lang.orCancelToReturn; } @Override @@ -440,7 +440,7 @@ public class RequirementsPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("reqPermissionsPrompt"); + return ChatColor.YELLOW + Lang.get("reqPermissionsPrompt") + Lang.orCancelToReturn; } @Override @@ -463,13 +463,13 @@ public class RequirementsPrompt extends FixedSetPrompt { public String getPromptText(ConversationContext context) { String text = ChatColor.LIGHT_PURPLE + Lang.get("customRequirementsTitle") + "\n"; if (quests.customRequirements.isEmpty()) { - text += ChatColor.BOLD + "" + ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ")"; + text += ChatColor.BOLD + "" + ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ") "; } else { for (CustomRequirement cr : quests.customRequirements) { text += ChatColor.DARK_PURPLE + " - " + cr.getName() + "\n"; } } - return text + ChatColor.YELLOW + Lang.get("reqCustomPrompt"); + return text + ChatColor.YELLOW + Lang.get("reqCustomPrompt") + Lang.orCancelToReturn; } @SuppressWarnings("unchecked") @@ -683,7 +683,7 @@ public class RequirementsPrompt extends FixedSetPrompt { skillList += ChatColor.GREEN + skills[i].getName() + "\n\n"; } } - return skillList + ChatColor.YELLOW + Lang.get("reqMcMMOPrompt"); + return skillList + ChatColor.YELLOW + Lang.get("reqMcMMOPrompt") + Lang.orCancelToReturn; } @Override @@ -721,7 +721,7 @@ public class RequirementsPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("reqMcMMOAmountsPrompt"); + return ChatColor.YELLOW + Lang.get("reqMcMMOAmountsPrompt") + Lang.orCancelToReturn; } @Override @@ -807,7 +807,7 @@ public class RequirementsPrompt extends FixedSetPrompt { text += ChatColor.DARK_PURPLE + "- " + ChatColor.LIGHT_PURPLE + s + "\n"; } } - text += ChatColor.YELLOW + Lang.get("reqHeroesPrimaryPrompt"); + text += ChatColor.YELLOW + Lang.get("reqHeroesPrimaryPrompt") + Lang.orCancelToReturn; return text; } @@ -858,7 +858,7 @@ public class RequirementsPrompt extends FixedSetPrompt { text += ChatColor.DARK_PURPLE + "- " + ChatColor.LIGHT_PURPLE + s + "\n"; } } - text += ChatColor.YELLOW + Lang.get("reqHeroesSecondaryPrompt"); + text += ChatColor.YELLOW + Lang.get("reqHeroesSecondaryPrompt") + Lang.orCancelToReturn; return text; } @@ -894,7 +894,7 @@ public class RequirementsPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("reqFailMessagePrompt"); + return ChatColor.YELLOW + Lang.get("reqFailMessagePrompt") + Lang.orCancelToReturn; } @Override diff --git a/src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java b/src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java index 8eb65dae8..598b27144 100644 --- a/src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java +++ b/src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java @@ -319,7 +319,7 @@ public class RewardsPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - String lang1 = Lang.get("rewCommandPrompt"); + String lang1 = Lang.get("rewCommandPrompt") + Lang.orCancelToReturn; lang1 = lang1.replaceAll("", ChatColor.BOLD + "" + ChatColor.RED + "comma" + ChatColor.RESET + ChatColor.YELLOW); String lang2 = Lang.get("rewCommandPromptHint"); return ChatColor.YELLOW + lang1 + "\n" + lang2; @@ -348,7 +348,7 @@ public class RewardsPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext context) { - return ChatColor.YELLOW + Lang.get("rewPermissionsPrompt"); + return ChatColor.YELLOW + Lang.get("rewPermissionsPrompt") + Lang.orCancelToReturn; } @Override @@ -463,7 +463,7 @@ public class RewardsPrompt extends FixedSetPrompt { skillList += ChatColor.GREEN + skills[i].getName() + "\n\n"; } } - return skillList + Lang.get("rewMcMMOPrompt") + "\n" + ChatColor.GOLD + Lang.get("rewMcMMOPromptHint"); + return skillList + Lang.get("rewMcMMOPrompt") + Lang.orCancelToReturn + "\n" + ChatColor.GOLD + Lang.get("rewMcMMOPromptHint"); } @Override @@ -622,7 +622,7 @@ public class RewardsPrompt extends FixedSetPrompt { } text = text.substring(0, text.length() - 2) + "\n"; } - text += ChatColor.YELLOW + Lang.get("rewHeroesClassesPrompt"); + text += ChatColor.YELLOW + Lang.get("rewHeroesClassesPrompt") + Lang.orCancelToReturn; return text; } @@ -655,7 +655,7 @@ public class RewardsPrompt extends FixedSetPrompt { @Override public String getPromptText(ConversationContext cc) { String text = Lang.get("heroesExperienceTitle") + "\n"; - text += ChatColor.YELLOW + Lang.get("rewHeroesExperiencePrompt"); + text += ChatColor.YELLOW + Lang.get("rewHeroesExperiencePrompt") + Lang.orCancelToReturn; return text; } @@ -691,7 +691,7 @@ public class RewardsPrompt extends FixedSetPrompt { for (PhatLoot pl : PhatLootsAPI.getAllPhatLoots()) { text += ChatColor.GRAY + "- " + ChatColor.BLUE + pl.name + "\n"; } - text += ChatColor.YELLOW + Lang.get("rewPhatLootsPrompt"); + text += ChatColor.YELLOW + Lang.get("rewPhatLootsPrompt") + Lang.orCancelToReturn; return text; } @@ -727,13 +727,13 @@ public class RewardsPrompt extends FixedSetPrompt { public String getPromptText(ConversationContext context) { String text = ChatColor.LIGHT_PURPLE + Lang.get("customRewardsTitle") + "\n"; if (quests.customRewards.isEmpty()) { - text += ChatColor.BOLD + "" + ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ")"; + text += ChatColor.BOLD + "" + ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ") "; } else { for (CustomReward cr : quests.customRewards) { text += ChatColor.DARK_PURPLE + " - " + cr.getName() + "\n"; } } - return text + ChatColor.YELLOW + Lang.get("rewCustomRewardPrompt"); + return text + ChatColor.YELLOW + Lang.get("rewCustomRewardPrompt") + Lang.orCancelToReturn; } @SuppressWarnings("unchecked") diff --git a/src/main/java/me/blackvein/quests/util/Lang.java b/src/main/java/me/blackvein/quests/util/Lang.java index 8951fe246..2dca25f3e 100644 --- a/src/main/java/me/blackvein/quests/util/Lang.java +++ b/src/main/java/me/blackvein/quests/util/Lang.java @@ -35,6 +35,7 @@ public class Lang { private static final LangToken tokens = new LangToken(); public static final LinkedHashMap langMap = new LinkedHashMap(); private final Quests plugin; + public static String orCancelToReturn = "or 'cancel' to return"; public Lang(Quests plugin) { tokens.initTokens(); @@ -116,6 +117,7 @@ public class Lang { } langMap.putAll(allStrings); } + orCancelToReturn = get("strCancel").replaceAll("", get("cmdCancel")); plugin.getLogger().info("Loaded language " + iso + ". Translations via Crowdin"); } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 623de79d6..a5c81bff4 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: Quests main: me.blackvein.quests.Quests -version: ${project.version}-b${env.BUILD_NUMBER} +version: ${project.version}-b${env.BUILD_NUMBER}-UNSTABLE description: Player questing system website: http://dev.bukkit.org/server-mods/quests/ dev-url: https://github.com/Blackvein/Quests/ diff --git a/src/main/resources/strings.yml b/src/main/resources/strings.yml index 182f85404..bc6267d75 100644 --- a/src/main/resources/strings.yml +++ b/src/main/resources/strings.yml @@ -1,13 +1,3 @@ ---- -questFailed: "*QUEST FAILED*" -questMaxAllowed: "You may only have up to Quests." -questAlreadyOn: "You are already on that Quest!" -questTooEarly: "You may not take again for another