From b46aa5230fe4c234cb726603e6e420eb5dbf147e Mon Sep 17 00:00:00 2001 From: Zino Date: Sat, 3 Aug 2013 21:51:14 +0200 Subject: [PATCH] +Added stage start message +Added stage complete message --- src/me/blackvein/quests/Quest.java | 15 +++- src/me/blackvein/quests/QuestFactory.java | 27 +++++- src/me/blackvein/quests/Quester.java | 7 +- src/me/blackvein/quests/Quests.java | 12 +++ src/me/blackvein/quests/Stage.java | 54 ++++++++---- src/me/blackvein/quests/StageTimer.java | 5 ++ .../quests/prompts/CreateStagePrompt.java | 82 ++++++++++++++++++- .../quests/prompts/StagesPrompt.java | 80 +++++++++--------- src/me/blackvein/quests/util/CK.java | 2 + 9 files changed, 220 insertions(+), 64 deletions(-) diff --git a/src/me/blackvein/quests/Quest.java b/src/me/blackvein/quests/Quest.java index 3a145d954..1d195b3cc 100644 --- a/src/me/blackvein/quests/Quest.java +++ b/src/me/blackvein/quests/Quest.java @@ -57,10 +57,15 @@ public class Quest { // public void nextStage(Quester q){ - + + String stageCompleteMessage = q.currentStage.completeMessage; + if (stageCompleteMessage != null) { + q.getPlayer().sendMessage(Quests.parseString(stageCompleteMessage, q.currentQuest)); + } + if(q.currentStage.delay < 0){ - Player player = plugin.getServer().getPlayerExact(q.name); + Player player = q.getPlayer(); if(stages.indexOf(q.currentStage) == (stages.size() - 1)){ @@ -87,6 +92,11 @@ public class Quest { player.sendMessage(s); } + + String stageStartMessage = q.currentStage.startMessage; + if (stageStartMessage != null) { + q.getPlayer().sendMessage(Quests.parseString(stageStartMessage, q.currentQuest)); + } } @@ -94,7 +104,6 @@ public class Quest { q.delayTimeLeft = -1; }else{ - q.startStageTimer(); } diff --git a/src/me/blackvein/quests/QuestFactory.java b/src/me/blackvein/quests/QuestFactory.java index 10f987683..13d58ee41 100644 --- a/src/me/blackvein/quests/QuestFactory.java +++ b/src/me/blackvein/quests/QuestFactory.java @@ -1043,6 +1043,8 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { String event; Long delay; String delayMessage; + String startMessage; + String completeMessage; for (int i = 1; i <= StagesPrompt.getStages(cc); i++) { @@ -1103,7 +1105,8 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { event = null; delay = null; delayMessage = null; - + startMessage = null; + completeMessage = null; if (cc.getSessionData(pref + CK.S_BREAK_IDS) != null) { @@ -1197,6 +1200,14 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { if (cc.getSessionData(pref + CK.S_DENIZEN) != null) { script = (String) cc.getSessionData(pref + CK.S_DENIZEN); } + + if (cc.getSessionData(pref + CK.S_START_MESSAGE) != null) { + startMessage = (String) cc.getSessionData(pref + CK.S_START_MESSAGE); + } + + if (cc.getSessionData(pref + CK.S_COMPLETE_MESSAGE) != null) { + completeMessage = (String) cc.getSessionData(pref + CK.S_COMPLETE_MESSAGE); + } if (breakIds != null && breakIds.isEmpty() == false) { stage.set("break-block-ids", breakIds); @@ -1256,9 +1267,11 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { stage.set("sheep-to-shear", shearColors); stage.set("sheep-amounts", shearAmounts); stage.set("script-to-run", script); - stage.set(CK.S_EVENT, event); - stage.set(CK.S_DELAY, delay); + stage.set("event", event); + stage.set("delay", delay); stage.set("delay-message", delayMessage); + stage.set("start-message", startMessage); + stage.set("complete-message", completeMessage); } @@ -1628,6 +1641,14 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { if (stage.script != null) { cc.setSessionData(pref + CK.S_DENIZEN, stage.script); } + + if (stage.completeMessage != null) { + cc.setSessionData(pref + CK.S_COMPLETE_MESSAGE, stage.completeMessage); + } + + if (stage.startMessage != null) { + cc.setSessionData(pref + CK.S_START_MESSAGE, stage.startMessage); + } } // diff --git a/src/me/blackvein/quests/Quester.java b/src/me/blackvein/quests/Quester.java index a43d110d9..9f0a54c5b 100644 --- a/src/me/blackvein/quests/Quester.java +++ b/src/me/blackvein/quests/Quester.java @@ -71,7 +71,7 @@ public class Quester { public Player getPlayer() { - return plugin.getServer().getPlayer(name); + return plugin.getServer().getPlayerExact(name); } @@ -100,6 +100,11 @@ public class Quester { for (String s : getObjectives()) { player.sendMessage(s); } + + String stageStartMessage = currentStage.startMessage; + if (stageStartMessage != null) { + getPlayer().sendMessage(Quests.parseString(stageStartMessage, currentQuest)); + } if(q.initialEvent != null) q.initialEvent.happen(this); diff --git a/src/me/blackvein/quests/Quests.java b/src/me/blackvein/quests/Quests.java index 50a0d8a42..22ea0578e 100644 --- a/src/me/blackvein/quests/Quests.java +++ b/src/me/blackvein/quests/Quests.java @@ -3253,6 +3253,18 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener, stage.delayMessage = config.getString("quests." + s + ".stages.ordered." + s2 + ".delay-message"); } + + if (config.contains("quests." + s + ".stages.ordered." + s2 + ".start-message")) { + + stage.startMessage = config.getString("quests." + s + ".stages.ordered." + s2 + ".start-message"); + + } + + if (config.contains("quests." + s + ".stages.ordered." + s2 + ".complete-message")) { + + stage.completeMessage = config.getString("quests." + s + ".stages.ordered." + s2 + ".complete-message"); + + } stage.citizensToInteract = npcsToTalkTo; diff --git a/src/me/blackvein/quests/Stage.java b/src/me/blackvein/quests/Stage.java index 31a23c327..a2f4e0661 100644 --- a/src/me/blackvein/quests/Stage.java +++ b/src/me/blackvein/quests/Stage.java @@ -57,7 +57,7 @@ public class Stage { }; ArrayList deliverMessages = new ArrayList(); - LinkedList citizensToInteract = new LinkedList(){ + public LinkedList citizensToInteract = new LinkedList(){ @Override public boolean equals(Object o) { @@ -81,7 +81,7 @@ public class Stage { } }; - LinkedList citizensToKill = new LinkedList() { + public LinkedList citizensToKill = new LinkedList() { @Override public boolean equals(Object o) { @@ -105,22 +105,24 @@ public class Stage { } }; - LinkedList citizenNumToKill = new LinkedList(); + public LinkedList citizenNumToKill = new LinkedList(); - LinkedList bossesToKill = new LinkedList(); - LinkedList bossAmountsToKill = new LinkedList(); + public LinkedList bossesToKill = new LinkedList(); + public LinkedList bossAmountsToKill = new LinkedList(); - LinkedList locationsToReach = new LinkedList(); - LinkedList radiiToReachWithin = new LinkedList(); - LinkedList worldsToReachWithin = new LinkedList(); - LinkedList locationNames = new LinkedList(); - Map mobsToTame = new EnumMap(EntityType.class); - Map sheepToShear = new EnumMap(DyeColor.class); - Map, Boolean> itemsToCraft = new HashMap, Boolean>(); - String script; - Event event; - long delay = -1; - String delayMessage = null; + public LinkedList locationsToReach = new LinkedList(); + public LinkedList radiiToReachWithin = new LinkedList(); + public LinkedList worldsToReachWithin = new LinkedList(); + public LinkedList locationNames = new LinkedList(); + public Map mobsToTame = new EnumMap(EntityType.class); + public Map sheepToShear = new EnumMap(DyeColor.class); + public Map, Boolean> itemsToCraft = new HashMap, Boolean>(); + public String script; + public Event event; + public long delay = -1; + public String delayMessage = null; + public String completeMessage = null; + public String startMessage = null; @Override public boolean equals(Object o) { @@ -285,6 +287,26 @@ public class Stage { } else if (other.delayMessage == null && delayMessage != null) { return false; } + + if (other.startMessage != null && startMessage != null) { + if (other.startMessage.equals(startMessage) == false) { + return false; + } + } else if (other.startMessage != null && startMessage == null) { + return false; + } else if (other.startMessage == null && startMessage != null) { + return false; + } + + if (other.completeMessage != null && completeMessage != null) { + if (other.completeMessage.equals(completeMessage) == false) { + return false; + } + } else if (other.completeMessage != null && completeMessage == null) { + return false; + } else if (other.completeMessage == null && completeMessage != null) { + return false; + } } diff --git a/src/me/blackvein/quests/StageTimer.java b/src/me/blackvein/quests/StageTimer.java index 6c71649ff..62a2e9a02 100644 --- a/src/me/blackvein/quests/StageTimer.java +++ b/src/me/blackvein/quests/StageTimer.java @@ -51,6 +51,11 @@ public class StageTimer implements Runnable{ player.sendMessage(s); } + + String stageStartMessage = quester.currentStage.startMessage; + if (stageStartMessage != null) { + quester.getPlayer().sendMessage(Quests.parseString(stageStartMessage, quester.currentQuest)); + } } diff --git a/src/me/blackvein/quests/prompts/CreateStagePrompt.java b/src/me/blackvein/quests/prompts/CreateStagePrompt.java index 9470768c7..ecef673e4 100644 --- a/src/me/blackvein/quests/prompts/CreateStagePrompt.java +++ b/src/me/blackvein/quests/prompts/CreateStagePrompt.java @@ -35,7 +35,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil { public CreateStagePrompt(int stageNum, QuestFactory qf, CitizensPlugin cit) { - super("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22"); + super("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24"); this.stageNum = stageNum; this.pref = "stage" + stageNum; this.citizens = cit; @@ -340,9 +340,21 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil { } } + + if (context.getSessionData(pref + CK.S_START_MESSAGE) == null) { + text += PINK + "" + BOLD + "21 " + RESET + PURPLE + "- Start Mmessage " + GRAY + " (" + Lang.get("noneSet") + ")\n"; + } else { + text += PINK + "" + BOLD + "21 " + RESET + PURPLE + "- Start Message " + GRAY + "(" + AQUA + "\"" + context.getSessionData(pref + CK.S_START_MESSAGE) + "\"" + GRAY + ")\n"; + } + + if (context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) == null) { + text += PINK + "" + BOLD + "22 " + RESET + PURPLE + "- Complete Message " + GRAY + " (" + Lang.get("noneSet") + ")\n"; + } else { + text += PINK + "" + BOLD + "22 " + RESET + PURPLE + "- Complete Message " + GRAY + "(" + AQUA + "\"" + context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) + "\"" + GRAY + ")\n"; + } - text += RED + "" + BOLD + "21 " + RESET + PURPLE + "- Delete Stage\n"; - text += GREEN + "" + BOLD + "22 " + RESET + PURPLE + "- Done\n"; + text += RED + "" + BOLD + "23 " + RESET + PURPLE + "- Delete Stage\n"; + text += GREEN + "" + BOLD + "24 " + RESET + PURPLE + "- Done\n"; return text; @@ -422,8 +434,12 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil { return new DenizenPrompt(); } } else if (input.equalsIgnoreCase("21")) { - return new DeletePrompt(); + return new StartMessagePrompt(); } else if (input.equalsIgnoreCase("22")) { + return new CompleteMessagePrompt(); + } else if (input.equalsIgnoreCase("23")) { + return new DeletePrompt(); + } else if (input.equalsIgnoreCase("24")) { return new StagesPrompt(questFactory); } else { return new CreateStagePrompt(stageNum, questFactory, citizens); @@ -3748,4 +3764,62 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil { } } + + private class StartMessagePrompt extends StringPrompt { + + @Override + public String getPromptText(ConversationContext context) { + + return YELLOW + "Enter start message, or enter \"clear\" to clear the message, or \"cancel\" to return"; + + } + + @Override + public Prompt acceptInput(ConversationContext context, String input) { + Player player = (Player) context.getForWhom(); + + if (input.equalsIgnoreCase("cancel") == false && input.equalsIgnoreCase("clear") == false) { + + context.setSessionData(pref + CK.S_START_MESSAGE, input); + return new CreateStagePrompt(stageNum, questFactory, citizens); + + } else if (input.equalsIgnoreCase("clear")) { + context.setSessionData(pref + CK.S_START_MESSAGE, null); + player.sendMessage(YELLOW + "Start message cleared."); + return new CreateStagePrompt(stageNum, questFactory, citizens); + } else { + return new StartMessagePrompt(); + } + } + + } + + private class CompleteMessagePrompt extends StringPrompt { + + @Override + public String getPromptText(ConversationContext context) { + + return YELLOW + "Enter start message, or enter \"clear\" to clear the message, or \"cancel\" to return"; + + } + + @Override + public Prompt acceptInput(ConversationContext context, String input) { + Player player = (Player) context.getForWhom(); + + if (input.equalsIgnoreCase("cancel") == false && input.equalsIgnoreCase("clear") == false) { + + context.setSessionData(pref + CK.S_COMPLETE_MESSAGE, input); + return new CreateStagePrompt(stageNum, questFactory, citizens); + + } else if (input.equalsIgnoreCase("clear")) { + context.setSessionData(pref + CK.S_COMPLETE_MESSAGE, null); + player.sendMessage(YELLOW + "Complete message cleared."); + return new CreateStagePrompt(stageNum, questFactory, citizens); + } else { + return new CompleteMessagePrompt(); + } + } + + } } diff --git a/src/me/blackvein/quests/prompts/StagesPrompt.java b/src/me/blackvein/quests/prompts/StagesPrompt.java index f93cb6ca8..6b899da37 100644 --- a/src/me/blackvein/quests/prompts/StagesPrompt.java +++ b/src/me/blackvein/quests/prompts/StagesPrompt.java @@ -107,60 +107,63 @@ public class StagesPrompt extends StringPrompt implements ColorUtil{ pref = "stage" + current; newPref = "stage" + (current - 1); - cc.setSessionData(newPref + "breakIds", cc.getSessionData(pref + CK.S_BREAK_IDS)); - cc.setSessionData(newPref + "breakAmounts", cc.getSessionData(pref + CK.S_BREAK_AMOUNTS)); + cc.setSessionData(newPref + CK.S_BREAK_IDS, cc.getSessionData(pref + CK.S_BREAK_IDS)); + cc.setSessionData(newPref + CK.S_BREAK_AMOUNTS, cc.getSessionData(pref + CK.S_BREAK_AMOUNTS)); - cc.setSessionData(newPref + "damageIds", cc.getSessionData(pref + CK.S_DAMAGE_IDS)); - cc.setSessionData(newPref + "damageAmounts", cc.getSessionData(pref + CK.S_DAMAGE_AMOUNTS)); + cc.setSessionData(newPref + CK.S_DAMAGE_IDS, cc.getSessionData(pref + CK.S_DAMAGE_IDS)); + cc.setSessionData(newPref + CK.S_DAMAGE_AMOUNTS, cc.getSessionData(pref + CK.S_DAMAGE_AMOUNTS)); - cc.setSessionData(newPref + "placeIds", cc.getSessionData(pref + CK.S_PLACE_IDS)); - cc.setSessionData(newPref + "placeAmounts", cc.getSessionData(pref + CK.S_PLACE_AMOUNTS)); + cc.setSessionData(newPref + CK.S_PLACE_IDS, cc.getSessionData(pref + CK.S_PLACE_IDS)); + cc.setSessionData(newPref + CK.S_PLACE_IDS, cc.getSessionData(pref + CK.S_PLACE_AMOUNTS)); - cc.setSessionData(newPref + "useIds", cc.getSessionData(pref + CK.S_USE_IDS)); - cc.setSessionData(newPref + "useAmounts", cc.getSessionData(pref + CK.S_USE_AMOUNTS)); + cc.setSessionData(newPref + CK.S_USE_IDS, cc.getSessionData(pref + CK.S_USE_IDS)); + cc.setSessionData(newPref + CK.S_USE_AMOUNTS, cc.getSessionData(pref + CK.S_USE_AMOUNTS)); - cc.setSessionData(newPref + "cutIds", cc.getSessionData(pref + CK.S_CUT_IDS)); - cc.setSessionData(newPref + "cutAmounts", cc.getSessionData(pref + CK.S_CUT_AMOUNTS)); + cc.setSessionData(newPref + CK.S_CUT_IDS, cc.getSessionData(pref + CK.S_CUT_IDS)); + cc.setSessionData(newPref + CK.S_CUT_AMOUNTS, cc.getSessionData(pref + CK.S_CUT_AMOUNTS)); - cc.setSessionData(newPref + "fish", cc.getSessionData(pref + CK.S_FISH)); + cc.setSessionData(newPref + CK.S_FISH, cc.getSessionData(pref + CK.S_FISH)); - cc.setSessionData(newPref + "playerKill", cc.getSessionData(pref + CK.S_PLAYER_KILL)); + cc.setSessionData(newPref + CK.S_PLAYER_KILL, cc.getSessionData(pref + CK.S_PLAYER_KILL)); - cc.setSessionData(newPref + "enchantTypes", cc.getSessionData(pref + CK.S_ENCHANT_TYPES)); - cc.setSessionData(newPref + "enchantIds", cc.getSessionData(pref + CK.S_ENCHANT_IDS)); - cc.setSessionData(newPref + "enchantAmounts", cc.getSessionData(pref + CK.S_ENCHANT_AMOUNTS)); + cc.setSessionData(newPref + CK.S_ENCHANT_TYPES, cc.getSessionData(pref + CK.S_ENCHANT_TYPES)); + cc.setSessionData(newPref + CK.S_ENCHANT_IDS, cc.getSessionData(pref + CK.S_ENCHANT_IDS)); + cc.setSessionData(newPref + CK.S_ENCHANT_AMOUNTS, cc.getSessionData(pref + CK.S_ENCHANT_AMOUNTS)); - cc.setSessionData(newPref + "deliveryItems", cc.getSessionData(pref + CK.S_DELIVERY_ITEMS)); - cc.setSessionData(newPref + "deliveryNPCs", cc.getSessionData(pref + CK.S_DELIVERY_NPCS)); - cc.setSessionData(newPref + "deliveryMessages", cc.getSessionData(pref + CK.S_DELIVERY_MESSAGES)); + cc.setSessionData(newPref + CK.S_DELIVERY_ITEMS, cc.getSessionData(pref + CK.S_DELIVERY_ITEMS)); + cc.setSessionData(newPref + CK.S_DELIVERY_NPCS, cc.getSessionData(pref + CK.S_DELIVERY_NPCS)); + cc.setSessionData(newPref + CK.S_DELIVERY_MESSAGES, cc.getSessionData(pref + CK.S_DELIVERY_MESSAGES)); - cc.setSessionData(newPref + "npcIdsToTalkTo", cc.getSessionData(pref + CK.S_NPCS_TO_TALK_TO)); + cc.setSessionData(newPref + CK.S_NPCS_TO_TALK_TO, cc.getSessionData(pref + CK.S_NPCS_TO_TALK_TO)); - cc.setSessionData(newPref + "npcIdsToKill", cc.getSessionData(pref + CK.S_NPCS_TO_KILL)); - cc.setSessionData(newPref + "npcAmountsToKill", cc.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS)); + cc.setSessionData(newPref + CK.S_NPCS_TO_KILL, cc.getSessionData(pref + CK.S_NPCS_TO_KILL)); + cc.setSessionData(newPref + CK.S_NPCS_TO_KILL_AMOUNTS, cc.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS)); - cc.setSessionData(newPref + "mobTypes", cc.getSessionData(pref + CK.S_MOB_TYPES)); - cc.setSessionData(newPref + "mobAmounts", cc.getSessionData(pref + CK.S_MOB_AMOUNTS)); - cc.setSessionData(newPref + "killLocations", cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS)); - cc.setSessionData(newPref + "killLocationRadii", cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS)); - cc.setSessionData(newPref + "killLocationNames", cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES)); + cc.setSessionData(newPref + CK.S_MOB_TYPES, cc.getSessionData(pref + CK.S_MOB_TYPES)); + cc.setSessionData(newPref + CK.S_MOB_AMOUNTS, cc.getSessionData(pref + CK.S_MOB_AMOUNTS)); + cc.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS, cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS)); + cc.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS_RADIUS, cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS)); + cc.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS_NAMES, cc.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES)); - cc.setSessionData(newPref + "reachLocations", cc.getSessionData(pref + CK.S_REACH_LOCATIONS)); - cc.setSessionData(newPref + "reachLocationRadii", cc.getSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS)); - cc.setSessionData(newPref + "reachLocationNames", cc.getSessionData(pref + CK.S_REACH_LOCATIONS_NAMES)); + cc.setSessionData(newPref + CK.S_REACH_LOCATIONS, cc.getSessionData(pref + CK.S_REACH_LOCATIONS)); + cc.setSessionData(newPref + CK.S_REACH_LOCATIONS_RADIUS, cc.getSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS)); + cc.setSessionData(newPref + CK.S_REACH_LOCATIONS_NAMES, cc.getSessionData(pref + CK.S_REACH_LOCATIONS_NAMES)); - cc.setSessionData(newPref + "tameTypes", cc.getSessionData(pref + CK.S_TAME_TYPES)); - cc.setSessionData(newPref + "tameAmounts", cc.getSessionData(pref + CK.S_TAME_AMOUNTS)); + cc.setSessionData(newPref + CK.S_TAME_TYPES, cc.getSessionData(pref + CK.S_TAME_TYPES)); + cc.setSessionData(newPref + CK.S_TAME_AMOUNTS, cc.getSessionData(pref + CK.S_TAME_AMOUNTS)); - cc.setSessionData(newPref + "shearColors", cc.getSessionData(pref + CK.S_SHEAR_COLORS)); - cc.setSessionData(newPref + "shearAmounts", cc.getSessionData(pref + CK.S_SHEAR_AMOUNTS)); + cc.setSessionData(newPref + CK.S_SHEAR_COLORS, cc.getSessionData(pref + CK.S_SHEAR_COLORS)); + cc.setSessionData(newPref + CK.S_SHEAR_AMOUNTS, cc.getSessionData(pref + CK.S_SHEAR_AMOUNTS)); - cc.setSessionData(newPref + "event", cc.getSessionData(pref + CK.S_EVENT)); + cc.setSessionData(newPref + CK.S_EVENT, cc.getSessionData(pref + CK.S_EVENT)); - cc.setSessionData(newPref + "delay", cc.getSessionData(pref + CK.S_DELAY)); - cc.setSessionData(newPref + "delayMessage", cc.getSessionData(pref + CK.S_DELAY_MESSAGE)); + cc.setSessionData(newPref + CK.S_DELAY, cc.getSessionData(pref + CK.S_DELAY)); + cc.setSessionData(newPref +CK.S_DELAY_MESSAGE, cc.getSessionData(pref + CK.S_DELAY_MESSAGE)); - cc.setSessionData(newPref + "denizen", cc.getSessionData(pref + CK.S_DENIZEN)); + cc.setSessionData(newPref + CK.S_DENIZEN, cc.getSessionData(pref + CK.S_DENIZEN)); + + cc.setSessionData(newPref + CK.S_COMPLETE_MESSAGE, cc.getSessionData(pref + CK.S_COMPLETE_MESSAGE)); + cc.setSessionData(newPref + CK.S_START_MESSAGE, cc.getSessionData(pref + CK.S_START_MESSAGE)); } @@ -219,6 +222,9 @@ public class StagesPrompt extends StringPrompt implements ColorUtil{ cc.setSessionData(pref + CK.S_DELAY_MESSAGE, null); cc.setSessionData(pref + CK.S_DENIZEN, null); + + cc.setSessionData(pref + CK.S_COMPLETE_MESSAGE, null); + cc.setSessionData(pref + CK.S_START_MESSAGE, null); if(last) break; diff --git a/src/me/blackvein/quests/util/CK.java b/src/me/blackvein/quests/util/CK.java index bb675be27..6291c6527 100644 --- a/src/me/blackvein/quests/util/CK.java +++ b/src/me/blackvein/quests/util/CK.java @@ -77,6 +77,8 @@ public class CK { public static String S_DELAY = "delay"; public static String S_DELAY_MESSAGE = "delayMessage"; public static String S_DENIZEN = "denizen"; + public static String S_COMPLETE_MESSAGE = "completeMessage"; + public static String S_START_MESSAGE = "startMessage"; //Events public static String E_OLD_EVENT = "oldEvent";