From c75ecb71f2198b646c1ea0cae61a93d6660b01f5 Mon Sep 17 00:00:00 2001 From: Blackvein Date: Sat, 22 Feb 2014 11:26:17 -0800 Subject: [PATCH] Finished 1.8.1 --- pom.xml | 2 +- .../me/blackvein/quests/PlayerListener.java | 34 ++--- src/main/java/me/blackvein/quests/Quest.java | 10 +- .../me/blackvein/quests/QuestFactory.java | 41 +++++- .../java/me/blackvein/quests/Quester.java | 28 ++-- src/main/java/me/blackvein/quests/Quests.java | 4 +- .../java/me/blackvein/quests/StageTimer.java | 8 +- .../quests/prompts/CreateStagePrompt.java | 120 +++++++++++++++++- .../quests/prompts/StagesPrompt.java | 34 ++++- src/main/resources/plugin.yml | 2 +- src/main/resources/quests.yml | 2 + 11 files changed, 237 insertions(+), 48 deletions(-) diff --git a/pom.xml b/pom.xml index 7eaddf922..8c6de2a91 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ me.blackvein.quests quests - 1.8.0-SNAPSHOT + 1.8.1-SNAPSHOT quests http://dev.bukkit.org/server-mods/quests/ jar diff --git a/src/main/java/me/blackvein/quests/PlayerListener.java b/src/main/java/me/blackvein/quests/PlayerListener.java index fff5b7d53..8f76f0dc7 100644 --- a/src/main/java/me/blackvein/quests/PlayerListener.java +++ b/src/main/java/me/blackvein/quests/PlayerListener.java @@ -195,7 +195,7 @@ public class PlayerListener implements Listener { if (quester.hasObjective("password")) { - quester.sayPass(evt.getMessage()); + quester.sayPass(evt); } @@ -244,40 +244,34 @@ public class PlayerListener implements Listener { if (plugin.checkQuester(evt.getPlayer().getName()) == false) { - boolean canOpen = true; - - if (canOpen == true) { - - Quester quester = plugin.getQuester(evt.getPlayer().getName()); - if (quester.hasObjective("breakBlock")) { - - if (evt.getPlayer().getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH) == false && evt.isCancelled() == false) { - quester.breakBlock(evt.getBlock().getType()); - } + Quester quester = plugin.getQuester(evt.getPlayer().getName()); + if (quester.hasObjective("breakBlock")) { + if (evt.getPlayer().getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH) == false && evt.isCancelled() == false) { + quester.breakBlock(evt.getBlock().getType()); } - if (quester.hasObjective("placeBlock")) { + } - if (quester.blocksPlaced.containsKey(evt.getBlock().getType())) { + if (quester.hasObjective("placeBlock")) { - if (quester.blocksPlaced.get(evt.getBlock().getType()) > 0) { + if (quester.blocksPlaced.containsKey(evt.getBlock().getType())) { - if (evt.isCancelled() == false) { - quester.blocksPlaced.put(evt.getBlock().getType(), quester.blocksPlaced.get(evt.getBlock().getType()) - 1); - } + if (quester.blocksPlaced.get(evt.getBlock().getType()) > 0) { + if (evt.isCancelled() == false) { + quester.blocksPlaced.put(evt.getBlock().getType(), quester.blocksPlaced.get(evt.getBlock().getType()) - 1); } } } - if (evt.getPlayer().getItemInHand().getType().equals(Material.SHEARS) && quester.hasObjective("cutBlock")) { + } - quester.cutBlock(evt.getBlock().getType()); + if (evt.getPlayer().getItemInHand().getType().equals(Material.SHEARS) && quester.hasObjective("cutBlock")) { - } + quester.cutBlock(evt.getBlock().getType()); } diff --git a/src/main/java/me/blackvein/quests/Quest.java b/src/main/java/me/blackvein/quests/Quest.java index 6f9a3361e..851918124 100644 --- a/src/main/java/me/blackvein/quests/Quest.java +++ b/src/main/java/me/blackvein/quests/Quest.java @@ -42,6 +42,7 @@ public class Quest { Location blockStart; Quests plugin; Event initialEvent; + //Requirements int moneyReq = 0; int questPointsReq = 0; @@ -59,6 +60,7 @@ public class Quest { public String failRequirements = null; // + //Rewards int moneyReward = 0; int questPoints = 0; @@ -73,8 +75,8 @@ public class Quest { List heroesClasses = new LinkedList(); List heroesAmounts = new LinkedList(); List phatLootRewards = new LinkedList(); - // + public void nextStage(Quester q) { String stageCompleteMessage = q.currentStage.completeMessage; @@ -100,9 +102,9 @@ public class Quest { q.currentStageIndex++; try { - setStage(q, q.currentStageIndex); + setStage(q, q.currentStageIndex); } catch (InvalidStageException e) { - e.printStackTrace(); + e.printStackTrace(); } } @@ -144,7 +146,7 @@ public class Quest { quester.addEmpties(); quester.getPlayer().sendMessage(ChatColor.GOLD + "---(Objectives)---"); - for (String s : quester.getObjectives()) { + for (String s : quester.getObjectivesReal()) { quester.getPlayer().sendMessage(s); diff --git a/src/main/java/me/blackvein/quests/QuestFactory.java b/src/main/java/me/blackvein/quests/QuestFactory.java index ea1959543..da4cd44c8 100644 --- a/src/main/java/me/blackvein/quests/QuestFactory.java +++ b/src/main/java/me/blackvein/quests/QuestFactory.java @@ -1262,9 +1262,12 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { LinkedList shearColors; LinkedList shearAmounts; - LinkedList customObjs = null; - LinkedList customObjCounts = null; - LinkedList> customObjsData = null; + LinkedList passDisplays; + LinkedList passPhrases; + + LinkedList customObjs; + LinkedList customObjCounts; + LinkedList> customObjsData; String script; String startEvent; @@ -1274,6 +1277,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { LinkedList chatEvents; LinkedList chatEventTriggers; Long delay; + String overrideDisplay; String delayMessage; String startMessage; String completeMessage; @@ -1330,6 +1334,13 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { shearColors = null; shearAmounts = null; + passDisplays = null; + passPhrases = null; + + customObjs = null; + customObjCounts = null; + customObjsData = null; + script = null; startEvent = null; finishEvent = null; @@ -1338,6 +1349,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { chatEvents = null; chatEventTriggers = null; delay = null; + overrideDisplay = null; delayMessage = null; startMessage = null; completeMessage = null; @@ -1422,6 +1434,11 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { shearAmounts = (LinkedList) cc.getSessionData(pref + CK.S_SHEAR_AMOUNTS); } + if (cc.getSessionData(pref + CK.S_PASSWORD_DISPLAYS) != null) { + passDisplays = (LinkedList) cc.getSessionData(pref + CK.S_PASSWORD_DISPLAYS); + passPhrases = (LinkedList) cc.getSessionData(pref + CK.S_PASSWORD_PHRASES); + } + if (cc.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES) != null) { customObjs = (LinkedList) cc.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES); customObjCounts = (LinkedList) cc.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_COUNT); @@ -1457,6 +1474,10 @@ 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_OVERRIDE_DISPLAY) != null) { + overrideDisplay = (String) cc.getSessionData(pref + CK.S_OVERRIDE_DISPLAY); + } if (cc.getSessionData(pref + CK.S_START_MESSAGE) != null) { startMessage = (String) cc.getSessionData(pref + CK.S_START_MESSAGE); @@ -1522,6 +1543,8 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { stage.set("mob-tame-amounts", tameAmounts); stage.set("sheep-to-shear", shearColors); stage.set("sheep-amounts", shearAmounts); + stage.set("password-displays", passDisplays); + stage.set("password-phrases", passPhrases); if(customObjs != null && customObjs.isEmpty() == false){ ConfigurationSection sec = stage.createSection("custom-objectives"); @@ -1547,6 +1570,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { } stage.set("delay", delay); stage.set("delay-message", delayMessage); + stage.set("objective-override", overrideDisplay); stage.set("start-message", startMessage); stage.set("complete-message", completeMessage); @@ -1961,6 +1985,13 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { } + if (stage.passwordDisplays.isEmpty() == false) { + + cc.setSessionData(pref + CK.S_PASSWORD_DISPLAYS, stage.passwordDisplays); + cc.setSessionData(pref + CK.S_PASSWORD_PHRASES, stage.passwordPhrases); + + } + if (stage.customObjectives.isEmpty() == false) { LinkedList list = new LinkedList(); @@ -2021,6 +2052,10 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil { cc.setSessionData(pref + CK.S_DENIZEN, stage.script); } + if (stage.objectiveOverride != null) { + cc.setSessionData(pref + CK.S_OVERRIDE_DISPLAY, stage.objectiveOverride); + } + if (stage.completeMessage != null) { cc.setSessionData(pref + CK.S_COMPLETE_MESSAGE, stage.completeMessage); } diff --git a/src/main/java/me/blackvein/quests/Quester.java b/src/main/java/me/blackvein/quests/Quester.java index 813ff41f0..db5b2f666 100644 --- a/src/main/java/me/blackvein/quests/Quester.java +++ b/src/main/java/me/blackvein/quests/Quester.java @@ -20,6 +20,7 @@ import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryType; +import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.potion.Potion; @@ -110,7 +111,7 @@ public class Quester { player.sendMessage(ChatColor.GOLD + "---(Objectives)---"); - for (String s : getObjectives()) { + for (String s : getObjectivesReal()) { player.sendMessage(s); } @@ -146,17 +147,24 @@ public class Quester { } + public LinkedList getObjectivesReal() { + + if (currentStage.objectiveOverride != null) { + LinkedList objectives = new LinkedList(); + objectives.add(ChatColor.GREEN + currentStage.objectiveOverride); + return objectives; + } else { + return getObjectives(); + } + + } + public LinkedList getObjectives() { LinkedList unfinishedObjectives = new LinkedList(); LinkedList finishedObjectives = new LinkedList(); LinkedList objectives = new LinkedList(); - if (currentStage.objectiveOverride != null) { - objectives.add(ChatColor.GREEN + currentStage.objectiveOverride); - return objectives; - } - for (Entry e : currentStage.blocksToDamage.entrySet()) { for (Entry e2 : blocksDamaged.entrySet()) { @@ -1007,12 +1015,13 @@ public class Quester { } - public void sayPass(String s) { + public void sayPass(AsyncPlayerChatEvent evt) { for (String pass : currentStage.passwordPhrases) { - if (pass.equalsIgnoreCase(s)) { + if (pass.equalsIgnoreCase(evt.getMessage())) { + evt.setCancelled(true); String display = currentStage.passwordDisplays.get(currentStage.passwordPhrases.indexOf(pass)); passwordsSaid.put(pass, true); finishObjective("password", null, null, null, null, null, null, null, null, display, null); @@ -1397,6 +1406,7 @@ public class Quester { mobsTamed.clear(); sheepSheared.clear(); customObjectiveCounts.clear(); + passwordsSaid.clear(); } @@ -2765,6 +2775,7 @@ public class Quester { if (q.equals(currentQuest) == false) { currentStage = null; + currentStageIndex = 0; resetObjectives(); if (plugin.getServer().getPlayer(name) != null) { plugin.getServer().getPlayer(name).sendMessage(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "Your active Quest " + ChatColor.DARK_PURPLE + currentQuest.name + ChatColor.RED + " has been modified. You have been forced to quit the Quest."); @@ -2782,6 +2793,7 @@ public class Quester { if (exists == false) { currentStage = null; + currentStageIndex = 0; resetObjectives(); if (plugin.getServer().getPlayer(name) != null) { plugin.getServer().getPlayer(name).sendMessage(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "Your active Quest " + ChatColor.DARK_PURPLE + currentQuest.name + ChatColor.RED + " no longer exists. You have been forced to quit the Quest."); diff --git a/src/main/java/me/blackvein/quests/Quests.java b/src/main/java/me/blackvein/quests/Quests.java index 57e8c808d..22a689883 100644 --- a/src/main/java/me/blackvein/quests/Quests.java +++ b/src/main/java/me/blackvein/quests/Quests.java @@ -588,7 +588,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener, cs.sendMessage(GOLD + "---(Objectives)---"); } - for (String s : getQuester(cs.getName()).getObjectives()) { + for (String s : getQuester(cs.getName()).getObjectivesReal()) { cs.sendMessage(s); @@ -1035,6 +1035,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener, quester.resetObjectives(); quester.currentStage = null; + quester.currentStageIndex = 0; cs.sendMessage(YELLOW + "You have quit " + PURPLE + quester.currentQuest.name + YELLOW + "."); quester.currentQuest = null; quester.saveData(); @@ -1274,6 +1275,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener, quester.resetObjectives(); quester.currentStage = null; + quester.currentStageIndex = 0; cs.sendMessage(GREEN + target.getName() + GOLD + " has forcibly quit the Quest " + PURPLE + quester.currentQuest.name + GOLD + "."); target.sendMessage(GREEN + cs.getName() + GOLD + " has forced you to quit the Quest " + PURPLE + quester.currentQuest.name + GOLD + "."); quester.currentQuest = null; diff --git a/src/main/java/me/blackvein/quests/StageTimer.java b/src/main/java/me/blackvein/quests/StageTimer.java index 87393f1fe..515968d0d 100644 --- a/src/main/java/me/blackvein/quests/StageTimer.java +++ b/src/main/java/me/blackvein/quests/StageTimer.java @@ -47,16 +47,16 @@ public class StageTimer implements Runnable{ quester.delayTimeLeft = -1; player.sendMessage(ChatColor.GOLD + "---(Objectives)---"); - for(String s : quester.getObjectives()){ + for(String s : quester.getObjectivesReal()){ player.sendMessage(s); } String stageStartMessage = quester.currentStage.startMessage; - if (stageStartMessage != null) { - quester.getPlayer().sendMessage(Quests.parseString(stageStartMessage, quester.currentQuest)); - } + if (stageStartMessage != null) { + quester.getPlayer().sendMessage(Quests.parseString(stageStartMessage, quester.currentQuest)); + } } diff --git a/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java b/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java index 35341475a..37e84169c 100644 --- a/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java +++ b/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java @@ -316,13 +316,13 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil { } if (context.getSessionData(pref + CK.S_PASSWORD_PHRASES) == null) { - text += PINK + "" + BOLD + "20 " + RESET + PINK + "- Password Objectives" + GRAY + " (" + Lang.get("noneSet") + ")\n"; + text += PURPLE + "" + BOLD + "20 " + RESET + PURPLE + "- Password Objectives" + GRAY + " (" + Lang.get("noneSet") + ")\n"; } else { LinkedList passPhrases = (LinkedList) context.getSessionData(pref + CK.S_PASSWORD_PHRASES); LinkedList passDisplays = (LinkedList) context.getSessionData(pref + CK.S_PASSWORD_DISPLAYS); - text += PINK + "" + BOLD + "20 " + RESET + PINK + "- Password Objectives\n"; + text += PURPLE + "" + BOLD + "20 " + RESET + PURPLE + "- Password Objectives\n"; for(int i = 0; i < passPhrases.size(); i++){ - text += AQUA + " - " + ITALIC + "\"" + passDisplays.get(i) + "\"" + RESET + DARKAQUA + "(" + passPhrases.get(i) + ")" + "\n"; + text += AQUA + " - \"" + passDisplays.get(i) + "\"" + RESET + DARKAQUA + " (" + passPhrases.get(i) + ")" + "\n"; } } @@ -474,10 +474,10 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil { } if (context.getSessionData(pref + CK.S_PASSWORD_PHRASES) == null) { - text += GRAY + "2 - " + "Add password phrase (" + Lang.get("noneSet") + ")\n"; + text += YELLOW + "2 - " + "Add password phrase (" + Lang.get("noneSet") + ")\n"; } else { - text += GRAY + "2 - " + "Add password phrase\n"; + text += YELLOW + "2 - " + "Add password phrase\n"; for (String phrase : getPasswordPhrases(context)) { text += GRAY + " - " + DARKAQUA + phrase + "\n"; @@ -549,6 +549,116 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil { } } + + private class PasswordDisplayPrompt extends StringPrompt { + + @Override + public String getPromptText(ConversationContext context) { + + String text = YELLOW + "Enter a password display, or 'cancel' to return\n"; + text += ITALIC + "" + GOLD + "(This is the text that will be displayed to the player as their objective)"; + + return text; + + } + + @Override + public Prompt acceptInput(ConversationContext context, String input) { + + if (input.equalsIgnoreCase("cancel") == false) { + + if(context.getSessionData(pref + CK.S_PASSWORD_DISPLAYS) != null) { + + List displays = (List) context.getSessionData(pref + CK.S_PASSWORD_DISPLAYS); + displays.add(input); + context.setSessionData(pref + CK.S_PASSWORD_DISPLAYS, displays); + + } else { + + List displays = new LinkedList(); + displays.add(input); + context.setSessionData(pref + CK.S_PASSWORD_DISPLAYS, displays); + + } + + } + + return new PasswordListPrompt(); + + } + + } + + private class PasswordPhrasePrompt extends StringPrompt { + + @Override + public String getPromptText(ConversationContext context) { + + String text = YELLOW + "Enter a password phrase, or 'cancel' to return\n"; + text += ITALIC + "" + GOLD + "(This is the text that a player has to say to complete the objective)"; + + return text; + + } + + @Override + public Prompt acceptInput(ConversationContext context, String input) { + + if (input.equalsIgnoreCase("cancel") == false) { + + if(context.getSessionData(pref + CK.S_PASSWORD_PHRASES) != null) { + + List phrases = (List) context.getSessionData(pref + CK.S_PASSWORD_PHRASES); + phrases.add(input); + context.setSessionData(pref + CK.S_PASSWORD_PHRASES, phrases); + + } else { + + List phrases = new LinkedList(); + phrases.add(input); + context.setSessionData(pref + CK.S_PASSWORD_PHRASES, phrases); + + } + + } + + return new PasswordListPrompt(); + + } + + } + + private class OverrideDisplayPrompt extends StringPrompt { + + @Override + public String getPromptText(ConversationContext context) { + + String text = YELLOW + "Enter objective display override, or 'clear' to clear the override, or 'cancel' to return.\n"; + text += ITALIC + "" + GOLD + "(The objective display override will show up as the players current objective)"; + + return text; + + } + + @Override + public Prompt acceptInput(ConversationContext context, String input) { + + if (input.equalsIgnoreCase("clear") == false && input.equalsIgnoreCase("cancel") == false) { + + context.setSessionData(pref + CK.S_OVERRIDE_DISPLAY, input); + + }else if(input.equalsIgnoreCase("clear")) { + + context.setSessionData(pref + CK.S_OVERRIDE_DISPLAY, null); + context.getForWhom().sendRawMessage(YELLOW + "Objective display override cleared."); + + } + + return new CreateStagePrompt(stageNum, questFactory, citizens); + + } + + } private class BreakBlockListPrompt extends FixedSetPrompt { diff --git a/src/main/java/me/blackvein/quests/prompts/StagesPrompt.java b/src/main/java/me/blackvein/quests/prompts/StagesPrompt.java index ca00aa39c..96e24f423 100644 --- a/src/main/java/me/blackvein/quests/prompts/StagesPrompt.java +++ b/src/main/java/me/blackvein/quests/prompts/StagesPrompt.java @@ -156,10 +156,26 @@ public class StagesPrompt extends StringPrompt implements ColorUtil{ 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 + CK.S_START_EVENT, cc.getSessionData(pref + CK.S_START_EVENT)); + cc.setSessionData(newPref + CK.S_DISCONNECT_EVENT, cc.getSessionData(pref + CK.S_DISCONNECT_EVENT)); + cc.setSessionData(newPref + CK.S_DEATH_EVENT, cc.getSessionData(pref + CK.S_DEATH_EVENT)); + cc.setSessionData(newPref + CK.S_CHAT_EVENTS, cc.getSessionData(pref + CK.S_CHAT_EVENTS)); + cc.setSessionData(newPref + CK.S_CHAT_EVENT_TRIGGERS, cc.getSessionData(pref + CK.S_CHAT_EVENT_TRIGGERS)); cc.setSessionData(newPref + CK.S_FINISH_EVENT, cc.getSessionData(pref + CK.S_FINISH_EVENT)); + cc.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES, cc.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES)); + cc.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_DATA, cc.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_COUNT)); + cc.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_COUNT, cc.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_COUNT)); + cc.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_DATA_DESCRIPTIONS, cc.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_DESCRIPTIONS)); + cc.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP, cc.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP)); + + cc.setSessionData(newPref + CK.S_PASSWORD_DISPLAYS, cc.getSessionData(pref + CK.S_PASSWORD_DISPLAYS)); + cc.setSessionData(newPref + CK.S_PASSWORD_PHRASES, cc.getSessionData(pref + CK.S_PASSWORD_PHRASES)); + + cc.setSessionData(newPref + CK.S_OVERRIDE_DISPLAY, cc.getSessionData(pref + CK.S_OVERRIDE_DISPLAY)); + 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 + CK.S_DELAY_MESSAGE, cc.getSessionData(pref + CK.S_DELAY_MESSAGE)); cc.setSessionData(newPref + CK.S_DENIZEN, cc.getSessionData(pref + CK.S_DENIZEN)); @@ -218,7 +234,23 @@ public class StagesPrompt extends StringPrompt implements ColorUtil{ cc.setSessionData(pref + CK.S_SHEAR_AMOUNTS, null); cc.setSessionData(pref + CK.S_FINISH_EVENT, null); + cc.setSessionData(pref + CK.S_START_EVENT, null); + cc.setSessionData(pref + CK.S_DEATH_EVENT, null); + cc.setSessionData(pref + CK.S_CHAT_EVENTS, null); + cc.setSessionData(pref + CK.S_CHAT_EVENT_TRIGGERS, null); + cc.setSessionData(pref + CK.S_DISCONNECT_EVENT, null); + cc.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES, null); + cc.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA, null); + cc.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_COUNT, null); + cc.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_DESCRIPTIONS, null); + cc.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP, null); + + cc.setSessionData(pref + CK.S_PASSWORD_DISPLAYS, null); + cc.setSessionData(pref + CK.S_PASSWORD_PHRASES, null); + + cc.setSessionData(pref + CK.S_OVERRIDE_DISPLAY, null); + cc.setSessionData(pref + CK.S_DELAY, null); cc.setSessionData(pref + CK.S_DELAY_MESSAGE, null); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 6cc12396d..a04457925 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: 1.8.1-alpha +version: 1.8.1 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/quests.yml b/src/main/resources/quests.yml index 2279888e0..cd4729970 100644 --- a/src/main/resources/quests.yml +++ b/src/main/resources/quests.yml @@ -61,6 +61,8 @@ quests: - id-276:amount-1 exp: 100 quest-points: 1 + + CatchFish: name: 'Catch Fish' ask-message: 'Catch some fish!'