diff --git a/src/main/java/me/blackvein/quests/Quests.java b/src/main/java/me/blackvein/quests/Quests.java index 4b9aa7b80..886c1a946 100644 --- a/src/main/java/me/blackvein/quests/Quests.java +++ b/src/main/java/me/blackvein/quests/Quests.java @@ -922,14 +922,15 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener } if (config.contains("quests." + questKey + ".rewards.commands")) { if (Quests.checkList(config.getList("quests." + questKey + ".rewards.commands"), String.class)) { - rews.setCommands(config.getStringList("quests." + questKey + ".rewards.commands")); + + rews.setCommands((LinkedList) config.getStringList("quests." + questKey + ".rewards.commands")); } else { skipQuestProcess("commands: Reward in Quest " + quest.getName() + " is not a list of commands!"); } } if (config.contains("quests." + questKey + ".rewards.permissions")) { if (Quests.checkList(config.getList("quests." + questKey + ".rewards.permissions"), String.class)) { - rews.setPermissions(config.getStringList("quests." + questKey + ".rewards.permissions")); + rews.setPermissions((LinkedList) config.getStringList("quests." + questKey + ".rewards.permissions")); } else { skipQuestProcess("permissions: Reward in Quest " + quest.getName() + " is not a list of permissions!"); } @@ -953,8 +954,8 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener skipQuestProcess("" + skill + " in mcmmo-skills: Reward in Quest " + quest.getName() + " is not a valid mcMMO skill name!"); } } - rews.setMcmmoSkills(config.getStringList("quests." + questKey + ".rewards.mcmmo-skills")); - rews.setMcmmoAmounts(config.getIntegerList("quests." + questKey + ".rewards.mcmmo-levels")); + rews.setMcmmoSkills((LinkedList) config.getStringList("quests." + questKey + ".rewards.mcmmo-skills")); + rews.setMcmmoAmounts((LinkedList) config.getIntegerList("quests." + questKey + ".rewards.mcmmo-levels")); } else { skipQuestProcess("mcmmo-levels: Reward in Quest " + quest.getName() + " is not a list of numbers!"); } @@ -978,8 +979,8 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener skipQuestProcess("" + heroClass + " in heroes-exp-classes: Reward in Quest " + quest.getName() + " is not a valid Heroes class name!"); } } - rews.setHeroesClasses(config.getStringList("quests." + questKey + ".rewards.heroes-exp-classes")); - rews.setHeroesAmounts(config.getDoubleList("quests." + questKey + ".rewards.heroes-exp-amounts")); + rews.setHeroesClasses((LinkedList) config.getStringList("quests." + questKey + ".rewards.heroes-exp-classes")); + rews.setHeroesAmounts((LinkedList) config.getDoubleList("quests." + questKey + ".rewards.heroes-exp-amounts")); } else { skipQuestProcess("heroes-exp-amounts: Reward in Quest " + quest.getName() + " is not a list of experience amounts (decimal numbers)!"); } @@ -1001,7 +1002,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener skipQuestProcess("" + loot + " in phat-loots: Reward in Quest " + quest.getName() + " is not a valid PhatLoot name!"); } } - rews.setPhatLoots(config.getStringList("quests." + questKey + ".rewards.phat-loots")); + rews.setPhatLoots((LinkedList) config.getStringList("quests." + questKey + ".rewards.phat-loots")); } else { skipQuestProcess("phat-loots: Reward in Quest " + quest.getName() + " is not a list of PhatLoots!"); } @@ -2653,7 +2654,6 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener return hero.getHeroClass().getName().equalsIgnoreCase(primaryClass); } - @SuppressWarnings("deprecation") public boolean testSecondaryHeroesClass(String secondaryClass, UUID uuid) { Hero hero = getHero(uuid); return hero.getSecondClass().getName().equalsIgnoreCase(secondaryClass); diff --git a/src/main/java/me/blackvein/quests/Rewards.java b/src/main/java/me/blackvein/quests/Rewards.java index fe7bdb5b5..7d9483e12 100644 --- a/src/main/java/me/blackvein/quests/Rewards.java +++ b/src/main/java/me/blackvein/quests/Rewards.java @@ -23,14 +23,14 @@ public class Rewards { private int money = 0; private int questPoints = 0; private int exp = 0; - private List commands = new LinkedList(); - private List permissions = new LinkedList(); + private LinkedList commands = new LinkedList(); + private LinkedList permissions = new LinkedList(); private LinkedList items = new LinkedList(); - private List mcmmoSkills = new LinkedList(); - private List mcmmoAmounts = new LinkedList(); - private List heroesClasses = new LinkedList(); - private List heroesAmounts = new LinkedList(); - private List phatLoots = new LinkedList(); + private LinkedList mcmmoSkills = new LinkedList(); + private LinkedList mcmmoAmounts = new LinkedList(); + private LinkedList heroesClasses = new LinkedList(); + private LinkedList heroesAmounts = new LinkedList(); + private LinkedList phatLoots = new LinkedList(); private Map> customRewards = new HashMap>(); public int getMoney() { @@ -54,13 +54,13 @@ public class Rewards { public List getCommands() { return commands; } - public void setCommands(List commands) { + public void setCommands(LinkedList commands) { this.commands = commands; } public List getPermissions() { return permissions; } - public void setPermissions(List permissions) { + public void setPermissions(LinkedList permissions) { this.permissions = permissions; } public LinkedList getItems() { @@ -72,31 +72,31 @@ public class Rewards { public List getMcmmoSkills() { return mcmmoSkills; } - public void setMcmmoSkills(List mcmmoSkills) { + public void setMcmmoSkills(LinkedList mcmmoSkills) { this.mcmmoSkills = mcmmoSkills; } public List getMcmmoAmounts() { return mcmmoAmounts; } - public void setMcmmoAmounts(List mcmmoAmounts) { + public void setMcmmoAmounts(LinkedList mcmmoAmounts) { this.mcmmoAmounts = mcmmoAmounts; } public List getHeroesClasses() { return heroesClasses; } - public void setHeroesClasses(List heroesClasses) { + public void setHeroesClasses(LinkedList heroesClasses) { this.heroesClasses = heroesClasses; } public List getHeroesAmounts() { return heroesAmounts; } - public void setHeroesAmounts(List heroesAmounts) { + public void setHeroesAmounts(LinkedList heroesAmounts) { this.heroesAmounts = heroesAmounts; } public List getPhatLoots() { return phatLoots; } - public void setPhatLoots(List phatLoots) { + public void setPhatLoots(LinkedList phatLoots) { this.phatLoots = phatLoots; } public Map> getCustomRewards() {