mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-27 21:26:29 +01:00
parent
c4a0709350
commit
0d27055b4e
@ -923,14 +923,14 @@ 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((LinkedList<String>) config.getStringList("quests." + questKey + ".rewards.commands"));
|
||||
rews.setCommands(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((LinkedList<String>) config.getStringList("quests." + questKey + ".rewards.permissions"));
|
||||
rews.setPermissions(config.getStringList("quests." + questKey + ".rewards.permissions"));
|
||||
} else {
|
||||
skipQuestProcess("permissions: Reward in Quest " + quest.getName() + " is not a list of permissions!");
|
||||
}
|
||||
@ -954,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((LinkedList<String>) config.getStringList("quests." + questKey + ".rewards.mcmmo-skills"));
|
||||
rews.setMcmmoAmounts((LinkedList<Integer>) config.getIntegerList("quests." + questKey + ".rewards.mcmmo-levels"));
|
||||
rews.setMcmmoSkills(config.getStringList("quests." + questKey + ".rewards.mcmmo-skills"));
|
||||
rews.setMcmmoAmounts(config.getIntegerList("quests." + questKey + ".rewards.mcmmo-levels"));
|
||||
} else {
|
||||
skipQuestProcess("mcmmo-levels: Reward in Quest " + quest.getName() + " is not a list of numbers!");
|
||||
}
|
||||
@ -979,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((LinkedList<String>) config.getStringList("quests." + questKey + ".rewards.heroes-exp-classes"));
|
||||
rews.setHeroesAmounts((LinkedList<Double>) config.getDoubleList("quests." + questKey + ".rewards.heroes-exp-amounts"));
|
||||
rews.setHeroesClasses(config.getStringList("quests." + questKey + ".rewards.heroes-exp-classes"));
|
||||
rews.setHeroesAmounts(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)!");
|
||||
}
|
||||
@ -1002,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((LinkedList<String>) config.getStringList("quests." + questKey + ".rewards.phat-loots"));
|
||||
rews.setPhatLoots(config.getStringList("quests." + questKey + ".rewards.phat-loots"));
|
||||
} else {
|
||||
skipQuestProcess("phat-loots: Reward in Quest " + quest.getName() + " is not a list of PhatLoots!");
|
||||
}
|
||||
|
@ -23,14 +23,14 @@ public class Rewards {
|
||||
private int money = 0;
|
||||
private int questPoints = 0;
|
||||
private int exp = 0;
|
||||
private LinkedList<String> commands = new LinkedList<String>();
|
||||
private LinkedList<String> permissions = new LinkedList<String>();
|
||||
private LinkedList<ItemStack> items = new LinkedList<ItemStack>();
|
||||
private LinkedList<String> mcmmoSkills = new LinkedList<String>();
|
||||
private LinkedList<Integer> mcmmoAmounts = new LinkedList<Integer>();
|
||||
private LinkedList<String> heroesClasses = new LinkedList<String>();
|
||||
private LinkedList<Double> heroesAmounts = new LinkedList<Double>();
|
||||
private LinkedList<String> phatLoots = new LinkedList<String>();
|
||||
private List<String> commands = new LinkedList<String>();
|
||||
private List<String> permissions = new LinkedList<String>();
|
||||
private List<ItemStack> items = new LinkedList<ItemStack>();
|
||||
private List<String> mcmmoSkills = new LinkedList<String>();
|
||||
private List<Integer> mcmmoAmounts = new LinkedList<Integer>();
|
||||
private List<String> heroesClasses = new LinkedList<String>();
|
||||
private List<Double> heroesAmounts = new LinkedList<Double>();
|
||||
private List<String> phatLoots = new LinkedList<String>();
|
||||
private Map<String, Map<String, Object>> customRewards = new HashMap<String, Map<String, Object>>();
|
||||
|
||||
public int getMoney() {
|
||||
@ -54,49 +54,49 @@ public class Rewards {
|
||||
public List<String> getCommands() {
|
||||
return commands;
|
||||
}
|
||||
public void setCommands(LinkedList<String> commands) {
|
||||
public void setCommands(List<String> commands) {
|
||||
this.commands = commands;
|
||||
}
|
||||
public List<String> getPermissions() {
|
||||
return permissions;
|
||||
}
|
||||
public void setPermissions(LinkedList<String> permissions) {
|
||||
public void setPermissions(List<String> permissions) {
|
||||
this.permissions = permissions;
|
||||
}
|
||||
public LinkedList<ItemStack> getItems() {
|
||||
public List<ItemStack> getItems() {
|
||||
return items;
|
||||
}
|
||||
public void setItems(LinkedList<ItemStack> items) {
|
||||
public void setItems(List<ItemStack> items) {
|
||||
this.items = items;
|
||||
}
|
||||
public List<String> getMcmmoSkills() {
|
||||
return mcmmoSkills;
|
||||
}
|
||||
public void setMcmmoSkills(LinkedList<String> mcmmoSkills) {
|
||||
public void setMcmmoSkills(List<String> mcmmoSkills) {
|
||||
this.mcmmoSkills = mcmmoSkills;
|
||||
}
|
||||
public List<Integer> getMcmmoAmounts() {
|
||||
return mcmmoAmounts;
|
||||
}
|
||||
public void setMcmmoAmounts(LinkedList<Integer> mcmmoAmounts) {
|
||||
public void setMcmmoAmounts(List<Integer> mcmmoAmounts) {
|
||||
this.mcmmoAmounts = mcmmoAmounts;
|
||||
}
|
||||
public List<String> getHeroesClasses() {
|
||||
return heroesClasses;
|
||||
}
|
||||
public void setHeroesClasses(LinkedList<String> heroesClasses) {
|
||||
public void setHeroesClasses(List<String> heroesClasses) {
|
||||
this.heroesClasses = heroesClasses;
|
||||
}
|
||||
public List<Double> getHeroesAmounts() {
|
||||
return heroesAmounts;
|
||||
}
|
||||
public void setHeroesAmounts(LinkedList<Double> heroesAmounts) {
|
||||
public void setHeroesAmounts(List<Double> heroesAmounts) {
|
||||
this.heroesAmounts = heroesAmounts;
|
||||
}
|
||||
public List<String> getPhatLoots() {
|
||||
return phatLoots;
|
||||
}
|
||||
public void setPhatLoots(LinkedList<String> phatLoots) {
|
||||
public void setPhatLoots(List<String> phatLoots) {
|
||||
this.phatLoots = phatLoots;
|
||||
}
|
||||
public Map<String, Map<String, Object>> getCustomRewards() {
|
||||
|
Loading…
Reference in New Issue
Block a user