From 0ba111ec6a38d38edca92660510ba614dba25bff Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Mon, 11 Apr 2022 23:52:07 -0400 Subject: [PATCH] NEW experience requirement --- .../me/blackvein/quests/quests/Planner.java | 15 +++ .../blackvein/quests/quests/Requirements.java | 4 + .../me/blackvein/quests/quests/Rewards.java | 31 +++++ .../main/java/me/blackvein/quests/Quests.java | 21 ++- .../main/java/me/blackvein/quests/Stage.java | 8 +- .../requirements/RequirementsPrompt.java | 121 ++++++++++++++---- .../convo/quests/rewards/RewardsPrompt.java | 108 ++++++++-------- .../quests/quests/BukkitQuestFactory.java | 5 + .../quests/quests/BukkitRequirements.java | 8 ++ .../java/me/blackvein/quests/util/CK.java | 1 + core/src/main/resources/strings.yml | 4 +- 11 files changed, 233 insertions(+), 93 deletions(-) diff --git a/api/src/main/java/me/blackvein/quests/quests/Planner.java b/api/src/main/java/me/blackvein/quests/quests/Planner.java index c6ef9c013..fe18ed622 100644 --- a/api/src/main/java/me/blackvein/quests/quests/Planner.java +++ b/api/src/main/java/me/blackvein/quests/quests/Planner.java @@ -14,19 +14,34 @@ package me.blackvein.quests.quests; public interface Planner { String getStart(); + long getStartInMillis(); + boolean hasStart(); + void setStart(final String start); + String getEnd(); + long getEndInMillis(); + boolean hasEnd(); + void setEnd(final String end); + long getRepeat(); + boolean hasRepeat(); + void setRepeat(final long repeat); + long getCooldown(); + boolean hasCooldown(); + void setCooldown(final long cooldown); + boolean getOverride(); + void setOverride(final boolean override); } diff --git a/api/src/main/java/me/blackvein/quests/quests/Requirements.java b/api/src/main/java/me/blackvein/quests/quests/Requirements.java index f90b7b348..ca8d4ecb7 100644 --- a/api/src/main/java/me/blackvein/quests/quests/Requirements.java +++ b/api/src/main/java/me/blackvein/quests/quests/Requirements.java @@ -26,6 +26,10 @@ public interface Requirements { void setQuestPoints(final int questPoints); + int getExp(); + + void setExp(final int exp); + List getItems(); void setItems(final List items); diff --git a/api/src/main/java/me/blackvein/quests/quests/Rewards.java b/api/src/main/java/me/blackvein/quests/quests/Rewards.java index c8e2e05df..cb45cfca0 100644 --- a/api/src/main/java/me/blackvein/quests/quests/Rewards.java +++ b/api/src/main/java/me/blackvein/quests/quests/Rewards.java @@ -19,36 +19,67 @@ import java.util.Map; public interface Rewards { int getMoney(); + void setMoney(final int money); + int getQuestPoints(); + void setQuestPoints(final int questPoints); + int getExp(); + void setExp(final int exp); + List getCommands(); + void setCommands(final List commands); + List getCommandsOverrideDisplay(); + void setCommandsOverrideDisplay(final List commandsOverrideDisplay); + List getPermissions(); + void setPermissions(final List permissions); + List getPermissionWorlds(); + void setPermissionWorlds(final List worldNames); + List getItems(); + void setItems(final List items); + List getMcmmoSkills(); + void setMcmmoSkills(final List mcmmoSkills); + List getMcmmoAmounts(); + void setMcmmoAmounts(final List mcmmoAmounts); + List getHeroesClasses(); + void setHeroesClasses(final List heroesClasses); + List getHeroesAmounts(); + void setHeroesAmounts(final List heroesAmounts); + int getPartiesExperience(); + void setPartiesExperience(final int partiesExperience); + List getPhatLoots(); + void setPhatLoots(final List phatLoots); + Map> getCustomRewards(); + void setCustomRewards(final Map> customRewards); + List getDetailsOverride(); + void setDetailsOverride(final List detailsOverride); /** diff --git a/core/src/main/java/me/blackvein/quests/Quests.java b/core/src/main/java/me/blackvein/quests/Quests.java index 2b9d7accb..c8420a6c2 100644 --- a/core/src/main/java/me/blackvein/quests/Quests.java +++ b/core/src/main/java/me/blackvein/quests/Quests.java @@ -1957,6 +1957,13 @@ public class Quests extends JavaPlugin implements QuestsAPI { throw new QuestFormatException("Reward money is not a number", questKey); } } + if (config.contains("quests." + questKey + ".rewards.quest-points")) { + if (config.getInt("quests." + questKey + ".rewards.quest-points", -999) != -999) { + rewards.setQuestPoints(config.getInt("quests." + questKey + ".rewards.quest-points")); + } else { + throw new QuestFormatException("Reward quest-points is not a number", questKey); + } + } if (config.contains("quests." + questKey + ".rewards.exp")) { if (config.getInt("quests." + questKey + ".rewards.exp", -999) != -999) { rewards.setExp(config.getInt("quests." + questKey + ".rewards.exp")); @@ -1996,13 +2003,6 @@ public class Quests extends JavaPlugin implements QuestsAPI { throw new QuestFormatException("Reward permissions is not a list of worlds", questKey); } } - if (config.contains("quests." + questKey + ".rewards.quest-points")) { - if (config.getInt("quests." + questKey + ".rewards.quest-points", -999) != -999) { - rewards.setQuestPoints(config.getInt("quests." + questKey + ".rewards.quest-points")); - } else { - throw new QuestFormatException("Reward quest-points is not a number", questKey); - } - } if (depends.isPluginAvailable("mcMMO")) { if (config.contains("quests." + questKey + ".rewards.mcmmo-skills")) { if (ConfigUtil.checkList(config.getList("quests." + questKey + ".rewards.mcmmo-skills"), @@ -2175,6 +2175,13 @@ public class Quests extends JavaPlugin implements QuestsAPI { throw new QuestFormatException("Requirement quest-points is not a number", questKey); } } + if (config.contains("quests." + questKey + ".requirements.exp")) { + if (config.getInt("quests." + questKey + ".requirements.exp", -999) != -999) { + requires.setExp(config.getInt("quests." + questKey + ".requirements.exp")); + } else { + throw new QuestFormatException("Requirement exp is not a number", questKey); + } + } if (config.contains("quests." + questKey + ".requirements.quest-blocks")) { if (ConfigUtil.checkList(config.getList("quests." + questKey + ".requirements.quest-blocks"), String.class)) { diff --git a/core/src/main/java/me/blackvein/quests/Stage.java b/core/src/main/java/me/blackvein/quests/Stage.java index fda9cb69b..e4009db46 100644 --- a/core/src/main/java/me/blackvein/quests/Stage.java +++ b/core/src/main/java/me/blackvein/quests/Stage.java @@ -136,10 +136,10 @@ public class Stage implements IStage { private String completeMessage = null; private String startMessage = null; private LinkedList objectiveOverrides = new LinkedList<>(); - private LinkedList customObjectives = new LinkedList<>(); - private LinkedList customObjectiveCounts = new LinkedList<>(); - private LinkedList customObjectiveDisplays = new LinkedList<>(); - private LinkedList> customObjectiveData = new LinkedList<>(); + private final LinkedList customObjectives = new LinkedList<>(); + private final LinkedList customObjectiveCounts = new LinkedList<>(); + private final LinkedList customObjectiveDisplays = new LinkedList<>(); + private final LinkedList> customObjectiveData = new LinkedList<>(); public LinkedList getBlocksToBreak() { return blocksToBreak; diff --git a/core/src/main/java/me/blackvein/quests/convo/quests/requirements/RequirementsPrompt.java b/core/src/main/java/me/blackvein/quests/convo/quests/requirements/RequirementsPrompt.java index dc20b28aa..066138080 100644 --- a/core/src/main/java/me/blackvein/quests/convo/quests/requirements/RequirementsPrompt.java +++ b/core/src/main/java/me/blackvein/quests/convo/quests/requirements/RequirementsPrompt.java @@ -52,7 +52,7 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { private final Quests plugin; private final String classPrefix; private boolean hasRequirement = false; - private final int size = 11; + private final int size = 12; public RequirementsPrompt(final ConversationContext context) { super(context); @@ -85,21 +85,22 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { case 4: case 5: case 6: - case 9: - return ChatColor.BLUE; case 7: + case 10: + return ChatColor.BLUE; + case 8: if (plugin.getDependencies().getMcmmoClassic() != null) { return ChatColor.BLUE; } else { return ChatColor.GRAY; } - case 8: + case 9: if (plugin.getDependencies().getHeroes() != null) { return ChatColor.BLUE; } else { return ChatColor.GRAY; } - case 10: + case 11: if (context.getSessionData(CK.REQ_FAIL_MESSAGE) == null) { if (!hasRequirement) { return ChatColor.GRAY; @@ -109,7 +110,7 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { } else { return ChatColor.BLUE; } - case 11: + case 12: return ChatColor.GREEN; default: return null; @@ -130,32 +131,34 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { case 3: return ChatColor.YELLOW + Lang.get("reqSetItem"); case 4: - return ChatColor.YELLOW + Lang.get("reqSetPerms"); + return ChatColor.YELLOW + Lang.get("reqSetExperience"); case 5: - return ChatColor.YELLOW + Lang.get("reqSetQuest"); + return ChatColor.YELLOW + Lang.get("reqSetPerms"); case 6: - return ChatColor.YELLOW + Lang.get("reqSetQuestBlocks"); + return ChatColor.YELLOW + Lang.get("reqSetQuest"); case 7: + return ChatColor.YELLOW + Lang.get("reqSetQuestBlocks"); + case 8: if (plugin.getDependencies().getMcmmoClassic() != null) { return ChatColor.YELLOW + Lang.get("reqSetMcMMO"); } else { return ChatColor.GRAY + Lang.get("reqSetMcMMO"); } - case 8: + case 9: if (plugin.getDependencies().getHeroes() != null) { return ChatColor.YELLOW + Lang.get("reqSetHeroes"); } else { return ChatColor.GRAY + Lang.get("reqSetHeroes"); } - case 9: - return ChatColor.DARK_PURPLE + Lang.get("reqSetCustom"); case 10: + return ChatColor.DARK_PURPLE + Lang.get("reqSetCustom"); + case 11: if (!hasRequirement) { return ChatColor.GRAY + Lang.get("overrideCreateSet"); } else { return ChatColor.YELLOW + Lang.get("overrideCreateSet"); } - case 11: + case 12: return ChatColor.YELLOW + Lang.get("done"); default: return null; @@ -202,6 +205,13 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { return text.toString(); } case 4: + if (context.getSessionData(CK.REQ_EXP) == null) { + return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")"; + } else { + return ChatColor.GRAY + "(" + ChatColor.AQUA + context.getSessionData(CK.REQ_EXP) + " " + + Lang.get("points") + ChatColor.GRAY + ")"; + } + case 5: if (context.getSessionData(CK.REQ_PERMISSION) == null) { return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")"; } else { @@ -214,7 +224,7 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { } return text.toString(); } - case 5: + case 6: if (context.getSessionData(CK.REQ_QUEST) == null) { return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")"; } else { @@ -230,7 +240,7 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { } return text.toString(); } - case 6: + case 7: if (context.getSessionData(CK.REQ_QUEST_BLOCK) == null) { return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")"; } else { @@ -246,7 +256,7 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { } return text.toString(); } - case 7: + case 8: if (plugin.getDependencies().getMcmmoClassic() != null) { if (context.getSessionData(CK.REQ_MCMMO_SKILLS) == null) { return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")"; @@ -267,7 +277,7 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { } else { return ChatColor.GRAY + "(" + Lang.get("notInstalled") + ")"; } - case 8: + case 9: if (plugin.getDependencies().getHeroes() != null) { if (context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) == null && context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) == null) { @@ -287,7 +297,7 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { } else { return ChatColor.GRAY + "(" + Lang.get("notInstalled") + ")"; } - case 9: + case 10: if (context.getSessionData(CK.REQ_CUSTOM) == null) { return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")"; } else { @@ -300,7 +310,7 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { } return text.toString(); } - case 10: + case 11: if (context.getSessionData(CK.REQ_FAIL_MESSAGE) == null) { if (!hasRequirement) { return ChatColor.GRAY + "(" + Lang.get("stageEditorOptional") + ")"; @@ -318,7 +328,7 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { } return text.toString(); } - case 11: + case 12: return ""; default: return null; @@ -375,26 +385,28 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { case 3: return new RequirementsItemListPrompt(context); case 4: - return new RequirementsPermissionsPrompt(context); + return new RequirementsExperiencePrompt(context); case 5: - return new RequirementsQuestListPrompt(context, true); + return new RequirementsPermissionsPrompt(context); case 6: - return new RequirementsQuestListPrompt(context, false); + return new RequirementsQuestListPrompt(context, true); case 7: + return new RequirementsQuestListPrompt(context, false); + case 8: if (plugin.getDependencies().getMcmmoClassic() != null) { return new RequirementsMcMMOListPrompt(context); } else { return new RequirementsPrompt(context); } - case 8: + case 9: if (plugin.getDependencies().getHeroes() != null) { return new RequirementsHeroesListPrompt(context); } else { return new RequirementsPrompt(context); } - case 9: - return new CustomRequirementModulePrompt(context); case 10: + return new CustomRequirementModulePrompt(context); + case 11: if (hasRequirement) { return new OverridePrompt.Builder() .context(context) @@ -405,7 +417,7 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidOption")); return new RequirementsPrompt(context); } - case 11: + case 12: return plugin.getQuestFactory().returnToMenu(context); default: return new RequirementsPrompt(context); @@ -416,6 +428,7 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { if (context.getSessionData(CK.REQ_MONEY) != null || context.getSessionData(CK.REQ_QUEST_POINTS) != null || context.getSessionData(CK.REQ_ITEMS) != null + || context.getSessionData(CK.REQ_EXP) != null || context.getSessionData(CK.REQ_PERMISSION) != null || context.getSessionData(CK.REQ_QUEST) != null || context.getSessionData(CK.REQ_QUEST_BLOCK) != null @@ -781,6 +794,60 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt { } } + public class RequirementsExperiencePrompt extends QuestsEditorStringPrompt { + + public RequirementsExperiencePrompt(final ConversationContext context) { + super(context); + } + + @Override + public String getTitle(final ConversationContext context) { + return null; + } + + @Override + public String getQueryText(final ConversationContext context) { + return Lang.get("reqExperiencePrompt"); + } + + @Override + public @NotNull String getPromptText(final @NotNull ConversationContext context) { + if (context.getPlugin() != null) { + final QuestsEditorPostOpenStringPromptEvent event + = new QuestsEditorPostOpenStringPromptEvent(context, this); + context.getPlugin().getServer().getPluginManager().callEvent(event); + } + + return ChatColor.YELLOW + getQueryText(context); + } + + @Override + public Prompt acceptInput(final @NotNull ConversationContext context, final String input) { + if (input == null) { + return null; + } + if (!input.equalsIgnoreCase(Lang.get("cmdCancel")) && !input.equalsIgnoreCase(Lang.get("cmdClear"))) { + try { + final int i = Integer.parseInt(input); + if (i > 0) { + context.setSessionData(CK.REQ_EXP, i); + } else { + context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("inputPosNum")); + return new RequirementsExperiencePrompt(context); + } + } catch (final NumberFormatException e) { + context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber") + .replace("", input)); + return new RequirementsExperiencePrompt(context); + } + } else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) { + context.setSessionData(CK.REQ_EXP, null); + return new RequirementsPrompt(context); + } + return new RequirementsPrompt(context); + } + } + public class RequirementsPermissionsPrompt extends QuestsEditorStringPrompt { public RequirementsPermissionsPrompt(final ConversationContext context) { diff --git a/core/src/main/java/me/blackvein/quests/convo/quests/rewards/RewardsPrompt.java b/core/src/main/java/me/blackvein/quests/convo/quests/rewards/RewardsPrompt.java index 38c2f9766..92ba5c9da 100644 --- a/core/src/main/java/me/blackvein/quests/convo/quests/rewards/RewardsPrompt.java +++ b/core/src/main/java/me/blackvein/quests/convo/quests/rewards/RewardsPrompt.java @@ -567,60 +567,6 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt { } } - public class RewardsExperiencePrompt extends QuestsEditorStringPrompt { - - public RewardsExperiencePrompt(final ConversationContext context) { - super(context); - } - - @Override - public String getTitle(final ConversationContext context) { - return null; - } - - @Override - public String getQueryText(final ConversationContext context) { - return Lang.get("rewExperiencePrompt"); - } - - @Override - public @NotNull String getPromptText(final @NotNull ConversationContext context) { - if (context.getPlugin() != null) { - final QuestsEditorPostOpenStringPromptEvent event - = new QuestsEditorPostOpenStringPromptEvent(context, this); - context.getPlugin().getServer().getPluginManager().callEvent(event); - } - - return ChatColor.YELLOW + getQueryText(context); - } - - @Override - public Prompt acceptInput(final @NotNull ConversationContext context, final String input) { - if (input == null) { - return null; - } - if (!input.equalsIgnoreCase(Lang.get("cmdCancel")) && !input.equalsIgnoreCase(Lang.get("cmdClear"))) { - try { - final int i = Integer.parseInt(input); - if (i > 0) { - context.setSessionData(CK.REW_EXP, i); - } else { - context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("inputPosNum")); - return new RewardsExperiencePrompt(context); - } - } catch (final NumberFormatException e) { - context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber") - .replace("", input)); - return new RewardsExperiencePrompt(context); - } - } else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) { - context.setSessionData(CK.REW_EXP, null); - return new RewardsPrompt(context); - } - return new RewardsPrompt(context); - } - } - public class RewardsQuestPointsPrompt extends QuestsEditorStringPrompt { public RewardsQuestPointsPrompt(final ConversationContext context) { @@ -797,6 +743,60 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt { } } } + + public class RewardsExperiencePrompt extends QuestsEditorStringPrompt { + + public RewardsExperiencePrompt(final ConversationContext context) { + super(context); + } + + @Override + public String getTitle(final ConversationContext context) { + return null; + } + + @Override + public String getQueryText(final ConversationContext context) { + return Lang.get("rewExperiencePrompt"); + } + + @Override + public @NotNull String getPromptText(final @NotNull ConversationContext context) { + if (context.getPlugin() != null) { + final QuestsEditorPostOpenStringPromptEvent event + = new QuestsEditorPostOpenStringPromptEvent(context, this); + context.getPlugin().getServer().getPluginManager().callEvent(event); + } + + return ChatColor.YELLOW + getQueryText(context); + } + + @Override + public Prompt acceptInput(final @NotNull ConversationContext context, final String input) { + if (input == null) { + return null; + } + if (!input.equalsIgnoreCase(Lang.get("cmdCancel")) && !input.equalsIgnoreCase(Lang.get("cmdClear"))) { + try { + final int i = Integer.parseInt(input); + if (i > 0) { + context.setSessionData(CK.REW_EXP, i); + } else { + context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("inputPosNum")); + return new RewardsExperiencePrompt(context); + } + } catch (final NumberFormatException e) { + context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber") + .replace("", input)); + return new RewardsExperiencePrompt(context); + } + } else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) { + context.setSessionData(CK.REW_EXP, null); + return new RewardsPrompt(context); + } + return new RewardsPrompt(context); + } + } public class RewardsCommandsPrompt extends QuestsEditorStringPrompt { diff --git a/core/src/main/java/me/blackvein/quests/quests/BukkitQuestFactory.java b/core/src/main/java/me/blackvein/quests/quests/BukkitQuestFactory.java index 7fbb02b37..f4069f56c 100644 --- a/core/src/main/java/me/blackvein/quests/quests/BukkitQuestFactory.java +++ b/core/src/main/java/me/blackvein/quests/quests/BukkitQuestFactory.java @@ -171,6 +171,9 @@ public class BukkitQuestFactory implements QuestFactory, ConversationAbandonedLi if (requirements.getQuestPoints() != 0) { context.setSessionData(CK.REQ_QUEST_POINTS, requirements.getQuestPoints()); } + if (requirements.getExp() != 0) { + context.setSessionData(CK.REW_EXP, requirements.getExp()); + } if (!requirements.getItems().isEmpty()) { context.setSessionData(CK.REQ_ITEMS, requirements.getItems()); context.setSessionData(CK.REQ_ITEMS_REMOVE, requirements.getRemoveItems()); @@ -612,6 +615,8 @@ public class BukkitQuestFactory implements QuestFactory, ConversationAbandonedLi ? context.getSessionData(CK.REQ_MONEY) : null); requirements.set("quest-points", context.getSessionData(CK.REQ_QUEST_POINTS) != null ? context.getSessionData(CK.REQ_QUEST_POINTS) : null); + requirements.set("exp", context.getSessionData(CK.REQ_EXP) != null + ? context.getSessionData(CK.REQ_EXP) : null); requirements.set("items", context.getSessionData(CK.REQ_ITEMS) != null ? context.getSessionData(CK.REQ_ITEMS) : null); requirements.set("remove-items", context.getSessionData(CK.REQ_ITEMS_REMOVE) != null diff --git a/core/src/main/java/me/blackvein/quests/quests/BukkitRequirements.java b/core/src/main/java/me/blackvein/quests/quests/BukkitRequirements.java index cd4af63ea..025d20088 100644 --- a/core/src/main/java/me/blackvein/quests/quests/BukkitRequirements.java +++ b/core/src/main/java/me/blackvein/quests/quests/BukkitRequirements.java @@ -22,6 +22,7 @@ import java.util.Map; public class BukkitRequirements implements Requirements { private int money = 0; private int questPoints = 0; + private int exp = 0; private List items = new LinkedList<>(); private List removeItems = new LinkedList<>(); private List neededQuests = new LinkedList<>(); @@ -46,6 +47,12 @@ public class BukkitRequirements implements Requirements { public void setQuestPoints(final int questPoints) { this.questPoints = questPoints; } + public int getExp() { + return exp; + } + public void setExp(final int exp) { + this.exp = exp; + } public List getItems() { return items; } @@ -117,6 +124,7 @@ public class BukkitRequirements implements Requirements { public boolean hasRequirement() { if (money != 0) { return true; } if (questPoints != 0) { return true; } + if (exp != 0) { return true; } if (!items.isEmpty()) { return true; } if (!removeItems.isEmpty()) { return true; } if (!neededQuests.isEmpty()) { return true; } diff --git a/core/src/main/java/me/blackvein/quests/util/CK.java b/core/src/main/java/me/blackvein/quests/util/CK.java index f9bce84de..1ecfdfbd6 100644 --- a/core/src/main/java/me/blackvein/quests/util/CK.java +++ b/core/src/main/java/me/blackvein/quests/util/CK.java @@ -34,6 +34,7 @@ public class CK { public static final String REQ_QUEST_POINTS = "questPointsReq"; public static final String REQ_ITEMS = "itemReqs"; public static final String REQ_ITEMS_REMOVE = "removeItemReqs"; + public static final String REQ_EXP = "expReq"; public static final String REQ_PERMISSION = "permissionReqs"; public static final String REQ_MCMMO_SKILLS = "mcMMOSkillReqs"; public static final String REQ_MCMMO_SKILL_AMOUNTS = "mcMMOSkillAmountReqs"; diff --git a/core/src/main/resources/strings.yml b/core/src/main/resources/strings.yml index 579b22468..8b22de6b3 100644 --- a/core/src/main/resources/strings.yml +++ b/core/src/main/resources/strings.yml @@ -429,6 +429,7 @@ conditionEditorEnterPlaceholderVal: "Enter placeholder values, , reqSetMoney: "Set money requirement" reqSetQuestPoints: "Set requirement" reqSetItem: "Set item requirements" +reqSetExperience: "Set experience requirement" reqSetPerms: "Set permission requirements" reqSetQuest: "Set quest requirements" reqSetQuestBlocks: "Set quest blocks" @@ -442,6 +443,7 @@ reqHeroesSetSecondary: "Set Secondary Class" reqQuestListTitle: "- Quests Available -" reqQuestPrompt: "Enter a list of quest names, , , " reqRemoveItemsPrompt: "Enter a list of true/false values, , " +reqExperiencePrompt: "Enter amount of experience, , " reqPermissionsPrompt: "Enter permission requirements, , , " reqCustomPrompt: "Enter the name of a custom requirement to add, , " reqMcMMOAmountsPrompt: "Enter mcMMO Classic skill amounts, , , " @@ -513,11 +515,11 @@ rewSetCustom: "Set custom rewards" rewSetHeroesClasses: "Set classes" rewSetHeroesAmounts: "Set experience amounts" rewMoneyPrompt: "Enter amount of , , " +rewQuestPointsPrompt: "Enter amount of , , " rewExperiencePrompt: "Enter amount of experience, , " rewCommandPrompt: "Enter command rewards (use '' to represent the player), , , " rewPermissionsPrompt: "Enter permission rewards, , , " rewPermissionsWorldPrompt: "Enter permission worlds, , , " -rewQuestPointsPrompt: "Enter amount of , , " rewMcMMOPrompt: "Enter mcMMO Classic skills (or enter 'All' for all skills), , " rewHeroesClassesPrompt: "Enter Heroes classes, , " rewHeroesExperiencePrompt: "Enter experience amounts (numbers, decimals are allowed), , "