Remove all deprecated code.

Remove Challenges.yml from resources, as old standard is outdated and there is no point to support it.
This commit is contained in:
BONNe1704 2019-04-11 12:49:43 +03:00
parent d5e75491e6
commit 8d238a5789
6 changed files with 1 additions and 1873 deletions

View File

@ -12,12 +12,9 @@ import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.ItemStack;
import world.bentobox.bentobox.api.configuration.Config;
import world.bentobox.bentobox.util.ItemParser;
import world.bentobox.challenges.database.object.ChallengeLevel;
import world.bentobox.challenges.database.object.ChallengeLevels;
import world.bentobox.challenges.database.object.Challenge;
import world.bentobox.challenges.database.object.Challenges;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.util.Util;
import world.bentobox.challenges.utils.GuiUtils;
@ -40,10 +37,6 @@ public class ChallengesImportManager
*/
public ChallengesImportManager(ChallengesAddon challengesAddon) {
this.addon = challengesAddon;
File challengeFile = new File(addon.getDataFolder(), "challenges.yml");
if (!challengeFile.exists()) {
addon.saveResource("challenges.yml",false);
}
}
/**
@ -205,173 +198,4 @@ public class ChallengesImportManager
}
return result;
}
// ---------------------------------------------------------------------
// Section: Backward compatibility
// ---------------------------------------------------------------------
/**
* This method imports challenges form 0.3 and below version.
* @param user - user
* @param world - world to import into
* @param overwrite - true if previous ones should be overwritten
* @return true if successful
*/
public boolean importPreviousChallenges(User user, World world, boolean overwrite)
{
ChallengesManager manager = this.addon.getChallengesManager();
List<Challenges> challenges =
new Config<>(this.addon, Challenges.class).loadConfigObjects();
if (!challenges.isEmpty())
{
List<ChallengeLevels> levels =
new Config<>(this.addon, ChallengeLevels.class).loadConfigObjects();
for (ChallengeLevels level : levels)
{
ChallengeLevel newlevel = this.createLevel(level, world);
if (newlevel != null)
{
manager.loadLevel(newlevel, overwrite, user, false);
}
}
for (Challenges challenge : challenges)
{
Challenge newChallenge = this.createChallenge(challenge, world);
if (newChallenge == null)
{
continue;
}
manager.loadChallenge(newChallenge, overwrite, user, false);
if (challenge.getLevel().isEmpty() || challenge.getLevel().equals("FREE"))
{
newChallenge.setLevel(ChallengesManager.FREE);
}
else
{
String levelName = Util.getWorld(world).getName() + "_" + challenge.getLevel();
if (this.addon.getChallengesManager().containsLevel(levelName))
{
manager.addChallengeToLevel(newChallenge,
this.addon.getChallengesManager().getLevel(levelName));
}
}
}
}
return true;
}
/**
* This method creates new ChallengeLevel based on old level settings.
* @param level Old level object.
* @param world World where new challenge will operate.
* @return New level or null, if old level does not operate in this world.
*/
private ChallengeLevel createLevel(ChallengeLevels level, World world)
{
if (!level.getWorlds().isEmpty() &&
!level.getWorlds().contains(Util.getWorld(world).getName()))
{
return null;
}
ChallengeLevel newLevel = new ChallengeLevel();
newLevel.setUniqueId(Util.getWorld(world).getName() + "_" + level.getUniqueId());
newLevel.setFriendlyName(level.getFriendlyName());
newLevel.setOrder(level.getOrder());
newLevel.setWorld(Util.getWorld(world).getName());
newLevel.setUnlockMessage(level.getUnlockMessage());
newLevel.setWaiverAmount(level.getWaiveramount());
newLevel.setRewardText(level.getRewardDescription());
newLevel.setRewardMoney(level.getMoneyReward());
newLevel.setRewardExperience(level.getExpReward());
newLevel.setRewardItems(level.getRewardItems());
newLevel.setRewardCommands(level.getRewardCommands());
return newLevel;
}
/**
* This method creates new Challenge based on old challenges settings.
* @param challenge Old challenges object.
* @param world World where new challenge will operate.
* @return New Challenge or null, if old challenge does not operate in this world.
*/
private Challenge createChallenge(Challenges challenge, World world)
{
if (!challenge.getWorld().equals(Util.getWorld(world).getName()))
{
// Does not operate in given world.
return null;
}
Challenge newChallenge = new Challenge();
newChallenge.setUniqueId(challenge.getUniqueId());
newChallenge.setFriendlyName(challenge.getFriendlyName());
newChallenge.setRemoveWhenCompleted(challenge.isRemoveWhenCompleted());
newChallenge.setDeployed(challenge.isDeployed());
newChallenge.setIcon(challenge.getIcon());
newChallenge.setEnvironment(new HashSet<>(challenge.getEnvironment()));
switch (challenge.getChallengeType())
{
case INVENTORY:
newChallenge.setChallengeType(Challenge.ChallengeType.INVENTORY);
break;
case ISLAND:
newChallenge.setChallengeType(Challenge.ChallengeType.ISLAND);
break;
default:
newChallenge.setChallengeType(Challenge.ChallengeType.OTHER);
break;
}
newChallenge.setOrder(challenge.getSlot());
newChallenge.setDescription(challenge.getDescription());
newChallenge.setRequiredEntities(challenge.getRequiredEntities());
newChallenge.setRequiredItems(challenge.getRequiredItems());
newChallenge.setRequiredBlocks(challenge.getRequiredBlocks());
newChallenge.setRequiredMoney(challenge.getReqMoney());
newChallenge.setRequiredExperience(challenge.getReqExp());
newChallenge.setRequiredIslandLevel(challenge.getReqIslandlevel());
newChallenge.setRequiredPermissions(challenge.getReqPerms());
newChallenge.setTakeMoney(challenge.isTakeMoney());
newChallenge.setTakeItems(challenge.isTakeItems());
newChallenge.setSearchRadius(challenge.getSearchRadius());
newChallenge.setRewardText(challenge.getRewardText());
newChallenge.setRewardItems(challenge.getRewardItems());
newChallenge.setRewardMoney(challenge.getRewardMoney());
newChallenge.setRewardExperience(challenge.getRewardExp());
newChallenge.setRewardCommands(challenge.getRewardCommands());
newChallenge.setRepeatable(challenge.isRepeatable());
newChallenge.setMaxTimes(challenge.getMaxTimes());
newChallenge.setRepeatRewardText(challenge.getRepeatRewardText());
newChallenge.setRepeatItemReward(challenge.getRepeatItemReward());
newChallenge.setRepeatMoneyReward(challenge.getRepeatMoneyReward());
newChallenge.setRepeatExperienceReward(challenge.getRepeatExpReward());
newChallenge.setRepeatRewardCommands(challenge.getRepeatRewardCommands());
return newChallenge;
}
}

View File

@ -1,226 +0,0 @@
package world.bentobox.challenges.database.object;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.inventory.ItemStack;
import world.bentobox.challenges.ChallengesManager;
import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.database.objects.DataObject;
/**
* Represent a challenge level
* @author tastybento
*
*/
@Deprecated
public class ChallengeLevels implements DataObject, Comparable<ChallengeLevels> {
public ChallengeLevels() {}
@ConfigComment("A friendly name for the level. If blank, level name is used.")
private String friendlyName = "";
@ConfigComment("Worlds that this level applies in. String list.")
private List<String> worlds = new ArrayList<>();
@ConfigComment("Commands to run when this level is completed")
private List<String> rewardCommands = new ArrayList<>();
@ConfigComment("Level name")
private String uniqueId = ChallengesManager.FREE;
@ConfigComment("The number of undone challenges that can be left on this level before unlocking next level")
private int waiveramount = 1;
@ConfigComment("The ordering of the levels, lowest to highest")
private int order = 0;
@ConfigComment("The message shown when unlocking this level")
private String unlockMessage = "";
@ConfigComment("Unlock reward description")
private String rewardDescription = "";
@ConfigComment("List of reward itemstacks")
private List<ItemStack> rewardItems;
@ConfigComment("Unlock experience reward")
private int expReward;
@ConfigComment("Unlock money reward")
private int moneyReward;
public String getFriendlyName() {
return friendlyName;
}
public List<String> getRewardCommands() {
return rewardCommands = new ArrayList<>();
}
@Override
public String getUniqueId() {
return uniqueId;
}
/**
* Get the number of undone tasks that can be left on a level before unlocking next level
* @return
*/
public int getWaiveramount() {
return waiveramount;
}
public void setFriendlyName(String friendlyName) {
this.friendlyName = friendlyName;
}
public void setRewardCommands(List<String> rewardCommands) {
this.rewardCommands = rewardCommands;
}
@Override
public void setUniqueId(String uniqueId) {
this.uniqueId = uniqueId;
}
public void setWaiveramount(int waiveramount) {
this.waiveramount = waiveramount;
}
public int getOrder() {
return order;
}
public void setOrder(int order) {
this.order = order;
}
@Override
public int compareTo(ChallengeLevels o) {
return Integer.compare(this.order, o.order);
}
/**
* @return the rewardDescription
*/
public String getRewardDescription() {
return rewardDescription;
}
/**
* @param rewardDescription the rewardDescription to set
*/
public void setRewardDescription(String rewardDescription) {
this.rewardDescription = rewardDescription;
}
/**
* @return the rewardItems
*/
public List<ItemStack> getRewardItems() {
return rewardItems;
}
/**
* @param rewardItems the rewardItems to set
*/
public void setRewardItems(List<ItemStack> rewardItems) {
this.rewardItems = rewardItems;
}
/**
* @return the expReward
*/
public int getExpReward() {
return expReward;
}
/**
* @param expReward the expReward to set
*/
public void setExpReward(int expReward) {
this.expReward = expReward;
}
/**
* @return the moneyReward
*/
public int getMoneyReward() {
return moneyReward;
}
/**
* @param moneyReward the moneyReward to set
*/
public void setMoneyReward(int moneyReward) {
this.moneyReward = moneyReward;
}
/**
* @return the unlockMessage
*/
public String getUnlockMessage() {
return unlockMessage;
}
/**
* @param unlockMessage the unlockMessage to set
*/
public void setUnlockMessage(String unlockMessage) {
this.unlockMessage = unlockMessage;
}
/**
* @return the worlds
*/
public List<String> getWorlds() {
return worlds;
}
/**
* @param worlds the worlds to set
*/
public void setWorlds(List<String> worlds) {
this.worlds = worlds;
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((uniqueId == null) ? 0 : uniqueId.hashCode());
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof ChallengeLevels)) {
return false;
}
ChallengeLevels other = (ChallengeLevels) obj;
if (uniqueId == null) {
if (other.uniqueId != null) {
return false;
}
} else if (!uniqueId.equals(other.uniqueId)) {
return false;
}
return true;
}
}

View File

@ -1,634 +0,0 @@
package world.bentobox.challenges.database.object;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.ItemStack;
import world.bentobox.challenges.ChallengesManager;
import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.database.objects.DataObject;
/**
* Data object for challenges
* @author tastybento
*
*/
@Deprecated
public class Challenges implements DataObject {
public Challenges() {}
public enum ChallengeType {
/**
* This challenge only shows and icon in the GUI and doesn't do anything.
*/
ICON,
/**
* The player must have the items on them.
*/
INVENTORY,
/**
* The island level has to be equal or over this amount. Only works if there's an island level plugin installed.
*/
LEVEL,
/**
* Items or required entities have to be within x blocks of the player.
*/
ISLAND
}
// The order of the fields is the order shown in the YML files
@ConfigComment("Whether this challenge is deployed or not")
private boolean deployed;
// Description
@ConfigComment("Name of the icon and challenge. May include color codes. Single line.")
private String friendlyName = "";
@ConfigComment("Description of the challenge. Will become the lore on the icon. Can include & color codes. String List.")
private List<String> description = new ArrayList<>();
@ConfigComment("The icon in the GUI for this challenge. ItemStack.")
private ItemStack icon = new ItemStack(Material.PAPER);
@ConfigComment("Icon slot where this challenge should be placed. 0 to 49. A negative value means any slot")
private int slot = -1;
// Definition
@ConfigComment("Challenge level. Default is Free")
private String level = ChallengesManager.FREE;
@ConfigComment("Challenge type can be ICON, INVENTORY, LEVEL or ISLAND.")
private ChallengeType challengeType = ChallengeType.INVENTORY;
@ConfigComment("World where this challenge operates. List only overworld. Nether and end are automatically covered.")
private String world = "";
@ConfigComment("List of environments where this challenge will occur: NETHER, NORMAL, THE_END. Leave blank for all.")
private List<World.Environment> environment = new ArrayList<>();
@ConfigComment("The required permissions to see this challenge. String list.")
private Set<String> reqPerms = new HashSet<>();
@ConfigComment("The number of blocks around the player to search for items on an island")
private int searchRadius = 10;
@ConfigComment("If true, the challenge will disappear from the GUI when completed")
private boolean removeWhenCompleted;
@ConfigComment("Take the required items from the player")
private boolean takeItems = true;
@ConfigComment("Take the money from the player")
private boolean takeMoney = false;
// Requirements
@ConfigComment("This is a map of the blocks required in a ISLAND challenge. Material, Integer")
private Map<Material, Integer> requiredBlocks = new EnumMap<>(Material.class);
@ConfigComment("The items that must be in the inventory to complete the challenge. ItemStack List.")
private List<ItemStack> requiredItems = new ArrayList<>();
@ConfigComment("Any entities that must be in the area for ISLAND type challenges. Map EntityType, Number")
private Map<EntityType, Integer> requiredEntities = new EnumMap<>(EntityType.class);
@ConfigComment("Required experience")
private int reqExp;
@ConfigComment("Required island level for this challenge. Only works if Level Addon is being used.")
private long reqIslandlevel;
@ConfigComment("Required money")
private int reqMoney;
// Rewards
@ConfigComment("List of items the player will receive first time. ItemStack List.")
private List<ItemStack> rewardItems = new ArrayList<>();
@ConfigComment("If this is blank, the reward text will be auto-generated, otherwise this will be used.")
private String rewardText = "";
@ConfigComment("Experience point reward")
private int rewardExp;
@ConfigComment("Money reward")
private int rewardMoney;
@ConfigComment("Commands to run when the player completes the challenge for the first time. String List")
private List<String> rewardCommands = new ArrayList<>();
// Repeatable
@ConfigComment("True if the challenge is repeatable")
private boolean repeatable;
@ConfigComment("Maximum number of times the challenge can be repeated")
private int maxTimes = 1;
@ConfigComment("Repeat exp award")
private int repeatExpReward;
@ConfigComment("Reward items for repeating the challenge. List of ItemStacks.")
private List<ItemStack> repeatItemReward = new ArrayList<>();
@ConfigComment("Repeat money award")
private int repeatMoneyReward;
@ConfigComment("Commands to run when challenge is repeated. String List.")
private List<String> repeatRewardCommands = new ArrayList<>();
@ConfigComment("Description of the repeat rewards. If blank, it will be autogenerated.")
private String repeatRewardText = "";
@ConfigComment("Unique name of the challenge")
private String uniqueId = "";
/*
* END OF SETTINGS
*/
/**
* @return the challengeType
*/
public ChallengeType getChallengeType() {
return challengeType;
}
/**
* @param challengeType the challengeType to set
*/
public void setChallengeType(ChallengeType challengeType) {
this.challengeType = challengeType;
}
/**
* @return the deployed
*/
public boolean isDeployed() {
return deployed;
}
/**
* @param deployed the deployed to set
*/
public void setDeployed(boolean deployed) {
this.deployed = deployed;
}
/**
* @return the description
*/
public List<String> getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(List<String> description) {
this.description = description;
}
/**
* @return the expReward
*/
public int getRewardExp() {
return rewardExp;
}
/**
* @param expReward the expReward to set
*/
public void setRewardExp(int expReward) {
this.rewardExp = expReward;
}
/**
* @return the friendlyName
*/
public String getFriendlyName() {
return friendlyName;
}
/**
* @param friendlyName the friendlyName to set
*/
public void setFriendlyName(String friendlyName) {
this.friendlyName = friendlyName;
}
/**
* @return the icon
*/
public ItemStack getIcon() {
return icon != null ? icon.clone() : new ItemStack(Material.MAP);
}
/**
* @param icon the icon to set
*/
public void setIcon(ItemStack icon) {
this.icon = icon;
}
/**
* @return the level
*/
public String getLevel() {
return level;
}
/**
* @param level the level to set
*/
public void setLevel(String level) {
if (level.isEmpty()) {
level = ChallengesManager.FREE;
}
this.level = level;
}
/**
* @return the maxTimes
*/
public int getMaxTimes() {
return maxTimes;
}
/**
* @param maxTimes the maxTimes to set
*/
public void setMaxTimes(int maxTimes) {
this.maxTimes = maxTimes;
}
/**
* @return the moneyReward
*/
public int getRewardMoney() {
return rewardMoney;
}
/**
* @param moneyReward the moneyReward to set
*/
public void setRewardMoney(int moneyReward) {
this.rewardMoney = moneyReward;
}
/**
* @return the removeWhenCompleted
*/
public boolean isRemoveWhenCompleted() {
return removeWhenCompleted;
}
/**
* @param removeWhenCompleted the removeWhenCompleted to set
*/
public void setRemoveWhenCompleted(boolean removeWhenCompleted) {
this.removeWhenCompleted = removeWhenCompleted;
}
/**
* @return the repeatable
*/
public boolean isRepeatable() {
return repeatable;
}
/**
* @param repeatable the repeatable to set
*/
public void setRepeatable(boolean repeatable) {
this.repeatable = repeatable;
}
/**
* @return the repeatExpReward
*/
public int getRepeatExpReward() {
return repeatExpReward;
}
/**
* @param repeatExpReward the repeatExpReward to set
*/
public void setRepeatExpReward(int repeatExpReward) {
this.repeatExpReward = repeatExpReward;
}
/**
* @return the repeatItemReward
*/
public List<ItemStack> getRepeatItemReward() {
return repeatItemReward;
}
/**
* @param repeatItemReward the repeatItemReward to set
*/
public void setRepeatItemReward(List<ItemStack> repeatItemReward) {
this.repeatItemReward = repeatItemReward;
}
/**
* @return the repeatMoneyReward
*/
public int getRepeatMoneyReward() {
return repeatMoneyReward;
}
/**
* @param repeatMoneyReward the repeatMoneyReward to set
*/
public void setRepeatMoneyReward(int repeatMoneyReward) {
this.repeatMoneyReward = repeatMoneyReward;
}
/**
* @return the repeatRewardCommands
*/
public List<String> getRepeatRewardCommands() {
return repeatRewardCommands;
}
/**
* @param repeatRewardCommands the repeatRewardCommands to set
*/
public void setRepeatRewardCommands(List<String> repeatRewardCommands) {
this.repeatRewardCommands = repeatRewardCommands;
}
/**
* @return the repeatRewardText
*/
public String getRepeatRewardText() {
return repeatRewardText;
}
/**
* @param repeatRewardText the repeatRewardText to set
*/
public void setRepeatRewardText(String repeatRewardText) {
this.repeatRewardText = repeatRewardText;
}
/**
* @return the reqExp
*/
public int getReqExp() {
return reqExp;
}
/**
* @param reqExp the reqExp to set
*/
public void setReqExp(int reqExp) {
this.reqExp = reqExp;
}
/**
* @return the reqIslandlevel
*/
public long getReqIslandlevel() {
return reqIslandlevel;
}
/**
* @param reqIslandlevel the reqIslandlevel to set
*/
public void setReqIslandlevel(long reqIslandlevel) {
this.reqIslandlevel = reqIslandlevel;
}
/**
* @return the reqMoney
*/
public int getReqMoney() {
return reqMoney;
}
/**
* @param reqMoney the reqMoney to set
*/
public void setReqMoney(int reqMoney) {
this.reqMoney = reqMoney;
}
/**
* @return the reqPerms
*/
public Set<String> getReqPerms() {
return reqPerms;
}
/**
* @param reqPerms the reqPerms to set
*/
public void setReqPerms(Set<String> reqPerms) {
this.reqPerms = reqPerms;
}
/**
* @return the requiredItems
*/
public List<ItemStack> getRequiredItems() {
return requiredItems;
}
/**
* @param requiredItems the requiredItems to set
*/
public void setRequiredItems(List<ItemStack> requiredItems) {
this.requiredItems = requiredItems;
}
/**
* @return requiredEntities
*/
public Map<EntityType, Integer> getRequiredEntities() {
return requiredEntities;
}
/**
* @param requiredEntities the requiredEntities to set
*/
public void setRequiredEntities(Map<EntityType, Integer> requiredEntities) {
this.requiredEntities = requiredEntities;
}
/**
* @return the requiredBlocks
*/
public Map<Material, Integer> getRequiredBlocks() {
return requiredBlocks;
}
/**
* @param map the requiredBlocks to set
*/
public void setRequiredBlocks(Map<Material, Integer> map) {
this.requiredBlocks = map;
}
/**
* @return the rewardCommands
*/
public List<String> getRewardCommands() {
return rewardCommands;
}
/**
* @param rewardCommands the rewardCommands to set
*/
public void setRewardCommands(List<String> rewardCommands) {
this.rewardCommands = rewardCommands;
}
/**
* @return the itemReward
*/
public List<ItemStack> getRewardItems() {
return rewardItems;
}
/**
* @param itemReward the itemReward to set
*/
public void setRewardItems(List<ItemStack> itemReward) {
this.rewardItems = itemReward;
}
/**
* @return the rewardText
*/
public String getRewardText() {
return rewardText;
}
/**
* @param rewardText the rewardText to set
*/
public void setRewardText(String rewardText) {
this.rewardText = rewardText;
}
/**
* @return the searchRadius
*/
public int getSearchRadius() {
return searchRadius;
}
/**
* @param searchRadius the searchRadius to set
*/
public void setSearchRadius(int searchRadius) {
this.searchRadius = searchRadius;
}
/**
* @return the slot
*/
public int getSlot() {
return slot;
}
/**
* @param slot the slot to set
*/
public void setSlot(int slot) {
this.slot = slot;
}
/**
* @return the takeItems
*/
public boolean isTakeItems() {
return takeItems;
}
/**
* @param takeItems the takeItems to set
*/
public void setTakeItems(boolean takeItems) {
this.takeItems = takeItems;
}
/**
* @return the takeMoney
*/
public boolean isTakeMoney() {
return takeMoney;
}
/**
* @param takeMoney the takeMoney to set
*/
public void setTakeMoney(boolean takeMoney) {
this.takeMoney = takeMoney;
}
/**
* @return the environment
*/
public List<World.Environment> getEnvironment() {
return environment;
}
/**
* @param environment the environment to set
*/
public void setEnvironment(List<World.Environment> environment) {
this.environment = environment;
}
/**
* @return the worlds
*/
public String getWorld() {
return world;
}
/**
* @param worlds the worlds to set
*/
public void setWorld(String world) {
this.world = world;
}
/**
* @return the uniqueId
*/
@Override
public String getUniqueId() {
return uniqueId;
}
/**
* @param uniqueId the uniqueId to set
*/
@Override
public void setUniqueId(String uniqueId) {
this.uniqueId = uniqueId;
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((uniqueId == null) ? 0 : uniqueId.hashCode());
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof Challenges)) {
return false;
}
Challenges other = (Challenges) obj;
if (uniqueId == null) {
if (other.uniqueId != null) {
return false;
}
} else if (!uniqueId.equals(other.uniqueId)) {
return false;
}
return true;
}
}

View File

@ -56,8 +56,6 @@ public class AdminGUI extends CommonGUI
DELETE_CHALLENGE,
DELETE_LEVEL,
IMPORT_CHALLENGES,
BACKWARD_CHALLENGES,
BACKWARD_PLAYER_DATA,
EDIT_SETTINGS
}
@ -113,8 +111,6 @@ public class AdminGUI extends CommonGUI
// Import Challenges
panelBuilder.item(15, this.createButton(Button.IMPORT_CHALLENGES));
panelBuilder.item(24, this.createButton(Button.BACKWARD_CHALLENGES));
panelBuilder.item(33, this.createButton(Button.BACKWARD_PLAYER_DATA));
// Edit Addon Settings
panelBuilder.item(16, this.createButton(Button.EDIT_SETTINGS));
@ -375,47 +371,6 @@ public class AdminGUI extends CommonGUI
break;
}
case BACKWARD_CHALLENGES:
{
permissionSuffix = IMPORT;
name = this.user.getTranslation("challenges.gui.buttons.admin.backward");
description = this.user.getTranslation("challenges.gui.descriptions.admin.backward");
icon = new ItemStack(Material.HOPPER);
clickHandler = (panel, user, clickType, slot) -> {
this.addon.getImportManager().
importPreviousChallenges(this.user, this.world, false);
return true;
};
glow = false;
break;
}
case BACKWARD_PLAYER_DATA:
{
permissionSuffix = IMPORT;
name = this.user.getTranslation("challenges.gui.buttons.admin.backward-player");
description = this.user.getTranslation("challenges.gui.descriptions.admin.backward-player");
icon = new ItemStack(Material.HOPPER);
clickHandler = (panel, user, clickType, slot) -> {
new ConfirmationGUI(this.user, status -> {
if (status)
{
this.addon.getChallengesManager().fixCorruptedPlayerData();
}
this.build();
});
return true;
};
glow = false;
break;
}
case EDIT_SETTINGS:
{
permissionSuffix = SETTINGS;

View File

@ -1,787 +0,0 @@
##########################################################################################
# Example challenges.yml file. This is the same format as ASkyBlock.
# Use the cimport command to import the challenges to your world.
# For example: /bsbadmin challenges import
# to overwrite previous challenges, use /bsbadmin challenges import overwrite
# Once challenges are imported, you can edit them directly in the database folder.
# BSkyBlock offers more features in the native challenge definition files.
# Do not use ASkyBlock format for editing challenges, as it misses a lot of functions that
# is added in new Challenges Add-on. This feature is just for admins who want to use old
# challenges for new BentoBox plugin.
# This is just a converter, not editor.
#
##########################################################################################
# Rewards and required items have to be described using Bukkit Materials
# and be exactly correct
# Do not use Type Id numbers - they will not work!
# Challenges can be one of three types - inventory, island or level.
# inventory - means the player must have the items on them
# island - means the items have to be on the island and within 10 blocks of the player
# entities are also supported, e.g., COW.
# level - means the island level has to be equal or over this amount.
# If level is set as nothing '', then the challenge is a free challenge and can be
# done at any time.
# Challenges can be repeatable only if they are inventory challenges
# permissions can be given as a reward
#
# Reward Commands - commands can be run when a challenge is completed and repeated
# Commands are:
# rewardcommands:
# - command1
# - command2
# repeatrewardcommands:
# - command1
# - command2
# The commands are listed and run in order. Do not put a / in front of the command.
# The token [player] will be replaced with the player's name.
# Example:
# rewardcommands:
# - pex promote [player]
# - heal [player]
# - warp winner_circle [player]
# If a command fails, it will be noted in the console.
#
# The format for POTIONS is as follows:
#
# Format POTION:NAME:<LEVEL>:<EXTENDED>:<SPLASH/LINGER>:QTY
# LEVEL, EXTENDED, SPLASH, LINGER are optional.
# LEVEL is a number, 1 or 2
# LINGER is for V1.9 servers and later
# Examples:
# POTION:STRENGTH:1:EXTENDED:SPLASH:1
# POTION:INSTANT_DAMAGE:2::LINGER:2
# POTION:JUMP:2:NOTEXTENDED:NOSPLASH:1
# POTION:WEAKNESS::::1 - any weakness potion
#
# Valid potion names are:
# WATER, REGEN, SPEED, FIRE_RESISTANCE, POISON, INSTANT_HEAL, NIGHT_VISION, WEAKNESS,
# STRENGTH, SLOWNESS, JUMP, INSTANT_DAMAGE, WATER_BREATHING, INVISIBILITY
# For V1.9 these are also available:
# LUCK, MUNDANE, THICK, AWKWARD
#
#
# Reseting islands and challenges - usually challenges are reset when a player resets
# their island (see resetchallenges in config.yml). You can stop some challenges from
# being reset by using resetallowed:false in the challenge.
##########################################################################################
challenges:
# Challenge levels - list as many as you like. If a challenge's level is '' it can
# be done anytime. You cannot name a challenge the same as a level.
levels: 'Novice Competent Expert Advanced Elite'
# The number of undone tasks that can be left on a level before unlocking next level
waiveramount: 1
# Free levels - which levels above should be auto done when reached, therefore unlocking next level.
# Example:
# freelevels: 'Novice' will immediately put player onto Competent level challenges
# freelevels: 'Novice Competent' will make all Novice, Competent and Expert challenges available immediately.
# freelevels: 'Competent' will open Competent and Expert levels once Novice is complete
freelevels: ''
# This section determines what happens when a player unlocks a new level
# The subname should correspond to the levels listed above
# Note that there is no section for the first level as it is automatically unlocked
levelUnlock:
Competent:
# What additional message to send player
message: 'Congratulations - you unlocked the &9Competent level!'
rewardDesc: 'A diamond!'
itemReward: 'DIAMOND:1'
moneyReward: 100
expReward: 100
# List permissions separated by spaces
permissionReward: ''
# Commands to run on this player. Use [player] for their name.
commands:
#- kit tools [player]
#- some other command
Expert:
# What additional message to send player
message: 'Congratulations - you unlocked the &aExpert level!'
rewardDesc: '3 diamonds!'
itemReward: 'DIAMOND:3'
moneyReward: 100
expReward: 100
permissionReward: ''
# Commands to run on this player. Use [player] for their name.
commands:
#- kit tools [player]
#- some other command
Advanced:
# What additional message to send player
message: 'Congratulations - you unlocked the &bAdvanced level!'
rewardDesc: '5 diamonds!'
itemReward: 'DIAMOND:5'
moneyReward: 100
expReward: 100
permissionReward: ''
# Commands to run on this player. Use [player] for their name.
commands:
#- kit tools [player]
#- some other command
Elite:
# What additional message to send player
message: 'Congratulations - you unlocked the &dElite level!'
rewardDesc: '7 diamonds!'
itemReward: 'DIAMOND:7'
moneyReward: 100
expReward: 100
permissionReward: ''
# Commands to run on this player. Use [player] for their name.
commands:
#- kit tools [player]
#- some other command
# Challenge list
# Challenge names must be in lowercase. Do not use the same name as a level!
challengeList:
glassmaker:
friendlyname: 'Glass Maker'
description: 'Create 1 block of glass'
icon: GLASS
level: 'Novice'
type: inventory
requiredItems: 'GLASS:1'
# You can require the player has a certain amount of money for inventory challenges.
# Remember to mention it in the description!
# If takeItems is true, the money will be removed, so you may want to give it
# back in the reward.
#requiredMoney: 10
takeItems: true
itemReward: 'ICE:1'
rewardText: '1 block of ice'
#rewardcommands:
#- kit tools [player]
moneyReward: 10
expReward: 30
permissionReward: ''
repeatable: true
repeatItemReward: 'ICE:1'
repeatRewardText: '1 block of ice'
repeatMoneyReward: 5
repeatExpReward: 10
#repeatrewardcommands:
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 2
# Allow this challenge to reset when the player resets their island
# Default is true. Set to false to keep this challenge completed.
# Admins can always reset challenges even if this is set to false.
resetallowed: true
breadmaker:
friendlyname: 'Bread Maker'
description: 'Bake 21 loaves of bread'
icon: BREAD
level: 'Novice'
type: inventory
requiredItems: 'BREAD:21'
takeItems: true
itemReward: 'DIRT:5'
rewardText: '5 dirt'
moneyReward: 10
expReward: 30
permissionReward: ''
repeatable: true
repeatItemReward: 'DIRT:1'
repeatRewardText: '1 dirt'
repeatMoneyReward: 5
repeatExpReward: 10
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
dyemaker:
friendlyname: 'Dye Maker'
description: 'Craft 32 cactus green dyes'
icon: CACTUS_GREEN
level: 'Novice'
type: inventory
requiredItems: 'CACTUS_GREEN:32'
takeItems: true
itemReward: 'OAK_SAPLING:2 BIRCH_SAPLING:2 JUNGLE_SAPLING:2 SPRUCE_SAPLING:2'
rewardText: '2 oak, 2 birch, 2 jungle and 2 spruce saplings'
moneyReward: 10
expReward: 30
permissionReward: ''
repeatable: true
repeatItemReward: 'ACACIA_SAPLING:1 DARK_OAK_SAPLING:1 OAK_SAPLING:1 BIRCH_SAPLING:1 JUNGLE_SAPLING:1 SPRUCE_SAPLING:1'
repeatRewardText: '1 of each kind of sapling'
repeatMoneyReward: 5
repeatExpReward: 10
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
papermaker:
friendlyname: 'Paper Maker'
description: 'Create 21 pages of paper'
icon: PAPER
level: 'Novice'
type: inventory
requiredItems: 'PAPER:21'
takeItems: true
itemReward: 'DIRT:5 CLAY:15'
rewardText: '5 dirt and 15 clay blocks'
moneyReward: 15
expReward: 30
permissionReward: ''
repeatable: true
repeatItemReward: 'SAND:2'
repeatRewardText: '2 sand blocks'
repeatMoneyReward: 5
repeatExpReward: 10
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
cobblemaker:
friendlyname: 'Cobble Maker'
description: 'Create a cobblestone generator and mine 64 cobblestone.'
icon: COBBLESTONE
level: 'Novice'
type: inventory
requiredItems: 'COBBLESTONE:64'
takeItems: true
itemReward: 'LEATHER:4'
permissionReward: ''
rewardText: '4 leather - boots or a book perhaps?'
moneyReward: 10
expReward: 30
repeatable: true
repeatItemReward: 'LEATHER:1'
repeatRewardText: '1 leather'
repeatMoneyReward: 5
repeatExpReward: 10
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
seedbank:
friendlyname: 'Seedbank'
description: 'Collect 32 melon seeds, 32 pumpkin seeds, 32 beetroot seeds and 32 wheat seeds'
icon: PUMPKIN_SEEDS
level: 'Novice'
type: inventory
requiredItems: 'MELON_SEEDS:32 PUMPKIN_SEEDS:32 WHEAT_SEEDS:32 BEETROOT_SEEDS:32'
takeItems: true
itemReward: 'DIRT:5 VINE:20'
rewardText: '5 dirt blocks and 20 vines'
moneyReward: 15
expReward: 30
permissionReward: ''
repeatable: true
repeatItemReward: 'DIRT:2 VINE:20'
repeatRewardText: '2 dirt blocks and 5 vines'
repeatMoneyReward: 5
repeatExpReward: 10
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
stewmaker:
friendlyname: 'Stew Maker'
description: 'Cook up 18 bowls of mushroom stew'
icon: MUSHROOM_STEW
level: 'Novice'
type: inventory
requiredItems: 'MUSHROOM_STEW:18'
takeItems: true
itemReward: 'MYCELIUM:2'
rewardText: '2 mycelium blocks'
moneyReward: 15
expReward: 30
permissionReward: ''
repeatable: true
repeatItemReward: 'MYCELIUM:1'
repeatRewardText: '1 mycelium block'
repeatMoneyReward: 5
repeatExpReward: 10
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
builder:
friendlyname: 'Builder'
description: 'Reach island level 10 (/[label] level).'
icon: OAK_WOOD
level: 'Novice'
type: level
requiredItems: 10
takeItems: false
itemReward: 'IRON_PICKAXE:1 DIRT:5 SPONGE:1'
rewardText: '1 iron pickaxe, 5 dirt and a Sponge'
moneyReward: 50
expReward: 50
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0
grinder:
description: 'Kill monsters and collect 64 rotten flesh, 32 skeleton bones, 32 string, 32 arrows, 16 gunpowder, 5 spider eyes'
icon: BONE
level: 'Competent'
type: inventory
requiredItems: 'ROTTEN_FLESH:64 STRING:32 GUNPOWDER:16 ARROW:32 BONE:32 SPIDER_EYE:5'
takeItems: true
itemReward: 'REDSTONE:16 IRON_ORE:5 FLINT:1 POTION:WATER_BREATHING:1 POTION:NIGHT_VISION:1'
rewardText: '16 redstone dust, 1 flint, 1 water breathing potion, 1 night vision potion and 5 iron(ore)'
moneyReward: 75
expReward: 75
permissionReward: ''
repeatable: true
repeatItemReward: 'REDSTONE:2 IRON_ORE:1 FLINT:1 POTION:WATER_BREATHING:1'
repeatRewardText: '2 redstone dust, 1 flint, 1 water breathing potion and 1 iron(ore)'
repeatMoneyReward: 15
repeatExpReward: 15
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
farmer:
description: 'Harvest 64 units of the following: wheat, sugar, melon, carrots, potatoes, pumpkin'
icon: WHEAT
level: 'Competent'
type: inventory
requiredItems: 'WHEAT:64 SUGAR:64 MELON:64 CARROT:64 POTATO:64 PUMPKIN:64'
takeItems: true
itemReward: 'REDSTONE:16 COCOA_BEANS:1 PIG_SPAWN_EGG:1 COW_SPAWN_EGG:1 CHICKEN_SPAWN_EGG:1'
rewardText: '16 redstone dust, 1 cocoa bean, 1 spawn egg (chicken,cow,pig)'
moneyReward: 75
expReward: 75
permissionReward: ''
repeatable: true
repeatItemReward: 'COCOA_BEANS:1 PIG_SPAWN_EGG:1 COW_SPAWN_EGG:1 CHICKEN_SPAWN_EGG:1'
repeatRewardText: '1 cocoa bean, 1 spawn egg (chicken,cow,pig)'
repeatMoneyReward: 20
repeatExpReward: 20
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
angler:
friendlyname: 'Angler'
description: 'Catch and cook 10 salmon fish'
icon: COOKED_SALMON
level: 'Competent'
type: inventory
requiredItems: 'COOKED_SALMON:10'
takeItems: true
itemReward: 'REDSTONE:16 IRON_ORE:5 INK_SAC:5'
rewardText: '16 redstone dust, 5 inksacs, 5 iron (ore)'
moneyReward: 75
expReward: 75
permissionReward: ''
repeatable: true
repeatItemReward: 'REDSTONE:2 IRON_ORE:1 INK_SAC:1'
repeatRewardText: '2 redstone dust, 1 inksac, 1 iron (ore)'
repeatMoneyReward: 15
repeatExpReward: 15
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
treecutter:
friendlyname: 'Treecutter'
description: 'Create a tree farm and collect 16 oak, birch, jungle, acacia, dark oak and spruce logs'
icon: OAK_LOG
level: 'Competent'
type: inventory
requiredItems: 'OAK_LOG:16 BIRCH_LOG:16 JUNGLE_LOG:16 SPRUCE_LOG:16 ACACIA_LOG:16 DARK_OAK_LOG:16'
takeItems: true
itemReward: 'REDSTONE:16 IRON_ORE:5 WOLF_SPAWN_EGG:1'
rewardText: '16 redstone dust, 5 iron (ore), 1 wolf spawn egg'
moneyReward: 75
expReward: 75
permissionReward: ''
repeatable: true
repeatItemReward: 'REDSTONE:2 IRON_ORE:1'
repeatRewardText: '2 redstone dust, 1 iron (ore)'
repeatMoneyReward: 15
repeatExpReward: 15
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
cookiemaker:
friendlyname: 'Cookie Maker'
description: 'Make 128 cookies and a bucket of milk'
icon: COOKIE
level: 'Competent'
type: inventory
requiredItems: 'MILK_BUCKET:1 COOKIE:128'
takeItems: true
itemReward: 'REDSTONE:16 IRON_ORE:5'
rewardText: '16 redstone dust, 5 iron (ore)'
moneyReward: 75
expReward: 75
permissionReward: ''
repeatable: true
repeatItemReward: 'REDSTONE:2 IRON_ORE:1'
repeatRewardText: '2 redstone dust, 1 iron (ore)'
repeatMoneyReward: 15
repeatExpReward: 15
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
craftsman:
friendlyname: 'Craftsman'
description: 'Reach island level 75 (/[label] level).'
icon: IRON_BLOCK
level: 'Competent'
type: level
requiredItems: 75
takeItems: false
itemReward: 'OBSIDIAN:10'
rewardText: '10 obsidian blocks'
moneyReward: 50
expReward: 50
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0
homestead:
friendlyname: 'Homestead'
description: 'Build a house that contains at least 1 oak door, white bed, bookshelf, crafting table, furnace, glass-block window, and wall torch.'
icon: WHITE_BED
level: 'Competent'
type: island
requiredItems: 'WHITE_BED:1 CRAFTING_TABLE:1 GLASS:1 OAK_DOOR:1 FURNACE:1 BOOKSHELF:1 WALL_TORCH:1'
# Search radius - the number of blocks that will be searched around the player
# Minimum 10, which searches from -10 to +10 blocks around the player in x,y,z
# Max is 50 because big searches cause lag
searchRadius: 10
takeItems: false
itemReward: 'JUKEBOX:1 MUSIC_DISC_CHIRP:1 LAPIS_BLOCK:10'
rewardText: '1 jukebox, 1 music disk, 10 lapis lazuli blocks'
moneyReward: 100
expReward: 100
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0
nether:
friendlyname: 'Nether'
description: 'Build a nether portal on your island and activate it.'
icon: NETHERRACK
level: 'Expert'
type: island
requiredItems: 'OBSIDIAN:10 NETHER_PORTAL:1'
takeItems: false
itemReward: 'DIAMOND_SWORD:1'
rewardText: '1 diamond sword'
moneyReward: 100
expReward: 100
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0
enderpearls:
friendlyname: 'Enderpearls'
description: 'Collect 15 enderpearls from endermen'
icon: ENDER_PEARL
level: 'Expert'
type: inventory
requiredItems: 'ENDER_PEARL:15'
takeItems: true
itemReward: 'GOLD_INGOT:5 BLAZE_ROD:1'
rewardText: '5 gold ingots and 1 blaze rod'
moneyReward: 50
expReward: 100
permissionReward: ''
repeatable: true
repeatItemReward: 'GOLD_INGOT:1 BLAZE_ROD:1'
repeatRewardText: '1 gold ingot and 1 blaze rod'
repeatMoneyReward: 15
repeatExpReward: 15
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
slimeballfarmer:
friendlyname: 'Slimeball Farmer'
description: 'Collect 40 slimeballs from slimes'
icon: SLIME_BALL
level: 'Expert'
type: inventory
requiredItems: 'SLIME_BALL:40'
takeItems: true
itemReward: 'GOLD_INGOT:5 IRON_ORE:5'
rewardText: '5 gold ingots and 5 blocks of iron ore'
moneyReward: 50
expReward: 100
permissionReward: ''
repeatable: true
repeatItemReward: 'REDSTONE:8'
repeatRewardText: '8 redstone dust'
repeatMoneyReward: 15
repeatExpReward: 15
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
baker:
friendlyname: 'baker'
description: 'Bake 5 cakes and 5 pumpkin pies'
icon: CAKE
level: 'Expert'
type: inventory
requiredItems: 'CAKE:5 PUMPKIN_PIE:5'
takeItems: true
itemReward: 'GOLD_INGOT:5 DIAMOND:1'
rewardText: '5 gold ingots and 1 diamond'
moneyReward: 50
expReward: 100
permissionReward: ''
repeatable: true
repeatItemReward: 'IRON_ORE:1'
repeatRewardText: '1 iron (ore)'
repeatMoneyReward: 15
repeatExpReward: 15
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
pioneer:
friendlyname: 'Pioneer'
description: 'Make 1 map and use it, a compass, a clock and collect 64 netherrack, 16 soulsand, and 1 ghast tear'
icon: MAP
level: 'Expert'
type: inventory
requiredItems: 'NETHERRACK:64 SOUL_SAND:16 GHAST_TEAR:1 MAP:1 COMPASS:1 CLOCK:1'
takeItems: true
itemReward: 'POWERED_RAIL:32 RAIL:256 DIAMOND:1 OCELOT_SPAWN_EGG:1'
rewardText: '256 rails, 32 powered rails, 1 ocelot spawn egg, 1 diamond'
moneyReward: 100
expReward: 100
permissionReward: ''
repeatable: true
repeatItemReward: 'IRON_ORE:1'
repeatRewardText: '1 iron (ore)'
repeatMoneyReward: 20
repeatExpReward: 20
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
mason:
friendlyname: 'Mason'
description: 'Reach island level 150 (/[label] level).'
icon: GOLD_BLOCK
level: 'Expert'
type: level
requiredItems: 150
takeItems: false
itemReward: 'DIAMOND:1 DIRT:20 GOLD_BLOCK:2'
rewardText: '1 diamond, 20 dirt, and 2 gold blocks'
moneyReward: 150
expReward: 150
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0
shepherd:
friendlyname: 'Shepherd'
description: 'Collect 5 of every color of wool'
icon: BLUE_WOOL
level: 'Advanced'
type: inventory
requiredItems: 'BLACK_WOOL:5 BLUE_WOOL:5 BROWN_WOOL:5 CYAN_WOOL:5 GRAY_WOOL:5 GREEN_WOOL:5 LIGHT_BLUE_WOOL:5 LIGHT_GRAY_WOOL:5 LIME_WOOL:5 MAGENTA_WOOL:5 ORANGE_WOOL:5 PINK_WOOL:5 PURPLE_WOOL:5 RED_WOOL:5 WHITE_WOOL:5 YELLOW_WOOL:5 '
takeItems: true
itemReward: 'DIAMOND:2 MUSIC_DISC_CAT:1 MUSIC_DISC_BLOCKS:1 MUSIC_DISC_STAL:1 SHEEP_SPAWN_EGG:1 EMERALD:5'
rewardText: '2 diamonds, 5 emeralds, 3 music disks, 1 sheep spawn egg'
moneyReward: 200
expReward: 200
permissionReward: ''
repeatable: true
repeatItemReward: 'EMERALD:1 SHEEP_SPAWN_EGG:1'
repeatRewardText: '1 emerald, 1 sheep spawn egg'
repeatMoneyReward: 20
repeatExpReward: 20
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
alchemist:
friendlyname: 'Alchemist'
description: 'Brew 1 potion of Fire Resistance, Slowness, Swiftness, Healing, Harming, Invisibility, Strength and Regeneration'
icon: BREWING_STAND
level: 'Advanced'
type: inventory
requiredItems: 'POTION:FIRE_RESISTANCE::::1 POTION:SLOWNESS::::1 POTION:SPEED::::1 POTION:INSTANT_HEAL::::1 POTION:INSTANT_DAMAGE::::1 POTION:INVISIBILITY::::1 POTION:STRENGTH::::1 POTION:REGEN::::1'
takeItems: true
itemReward: 'ENCHANTING_TABLE:1'
rewardText: 'Enchanting Table'
moneyReward: 200
expReward: 200
permissionReward: ''
repeatable: true
repeatItemReward: 'DIAMOND:1'
repeatRewardText: '1 diamond'
repeatMoneyReward: 20
repeatExpReward: 20
dj:
friendlyname: 'DJ'
description: 'Craft a jukebox and collect all music discs'
icon: MUSIC_DISC_CHIRP
level: 'Advanced'
type: inventory
requiredItems: 'MUSIC_DISC_11:1 MUSIC_DISC_13:1 MUSIC_DISC_BLOCKS:1 MUSIC_DISC_CAT:1 MUSIC_DISC_CHIRP:1 MUSIC_DISC_FAR:1 MUSIC_DISC_MALL:1 MUSIC_DISC_MELLOHI:1 MUSIC_DISC_STAL:1 MUSIC_DISC_STRAD:1 MUSIC_DISC_WAIT:1 MUSIC_DISC_WARD:1 JUKEBOX:1'
takeItems: true
itemReward: 'DIAMOND:3 EMERALD:10 GOLD_INGOT:5'
rewardText: '3 diamonds, 10 emeralds and 5 gold ingots'
moneyReward: 200
expReward: 200
permissionReward: ''
repeatable: true
repeatItemReward: 'DIAMOND:1 EMERALD:5 GOLD_INGOT:2'
repeatRewardText: '1 diamond, 5 emeralds and 2 gold bars'
repeatMoneyReward: 20
repeatExpReward: 20
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
gemcollector:
friendlyname: 'Gem Collector'
description: 'Collect 50 emeralds'
icon: EMERALD
level: 'Advanced'
type: inventory
requiredItems: 'EMERALD:50'
takeItems: true
itemReward: 'DIAMOND:10'
rewardText: '10 diamonds'
moneyReward: 200
expReward: 200
permissionReward: ''
repeatable: true
repeatItemReward: 'GOLD_INGOT:2'
repeatRewardText: '2 gold ingots'
repeatMoneyReward: 20
repeatExpReward: 20
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
culinaryartist:
friendlyname: 'Culinary Artist'
description: 'Collect 1 of every kind of cooked or crafted edible food (no raw food, zombie flesh, or super golden apples)'
icon: GOLDEN_APPLE
level: 'Advanced'
type: inventory
requiredItems: 'BAKED_POTATO:1 BREAD:1 CAKE:1 COOKED_CHICKEN:1 COOKED_COD:1 COOKED_SALMON:1 COOKED_PORKCHOP:1 COOKED_RABBIT:1 COOKIE:1 GOLDEN_APPLE:0:1 GOLDEN_CARROT:1 MUSHROOM_STEW:1 PUMPKIN_PIE:1 COOKED_BEEF:1'
takeItems: true
itemReward: 'GOLD_BLOCK:2 MUSIC_DISC_MALL:1 MUSIC_DISC_WAIT:1 MUSIC_DISC_13:1 MOOSHROOM_SPAWN_EGG:1 EMERALD:5'
rewardText: '2 gold blocks, 3 music discs, 1 mooshroom spawn egg, and 5 emeralds'
moneyReward: 200
expReward: 200
permissionReward: ''
repeatable: true
repeatItemReward: 'GOLD_INGOT:10 MOOSHROOM_SPAWN_EGG:1 EMERALD:1'
repeatRewardText: '10 gold ingots, 1 mooshroom spawn egg, 1 emerald'
repeatMoneyReward: 20
repeatExpReward: 20
# Max times limits how many times a challenge can be done. Comment out to make unlimited
maxtimes: 100
beaconator:
friendlyname: 'Beaconator'
description: 'Build a beacon and let it shine!'
icon: BEACON
level: 'Advanced'
type: island
requiredItems: 'BEACON:1'
takeItems: false
itemReward: 'STONE_BRICKS:20 CHISELED_STONE_BRICKS:20 CRACKED_STONE_BRICKS:20 MOSSY_STONE_BRICKS:20'
rewardText: '20 blocks of every kind of stone brick'
moneyReward: 300
expReward: 300
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0
ittakesavillage:
friendlyname: 'It Takes A Village'
description: 'Hold a village meeting with 10 villagers!'
icon: STONE
level: 'Advanced'
type: island
requiredItems: 'VILLAGER:10'
takeItems: false
itemReward: 'HOPPER:4'
rewardText: '4 hoppers'
moneyReward: 300
expReward: 300
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0
myprecious:
friendlyname: 'My Precious'
description: 'Build an iron golem'
icon: NAME_TAG
level: 'Advanced'
type: island
requiredItems: 'IRON_GOLEM:1'
takeItems: false
itemReward: 'NAME_TAG:1 ANVIL:1 CAULDRON:1 IRON_BLOCK:2'
rewardText: 'A name tag, an anvil, a cauldron and 2 iron blocks'
moneyReward: 300
expReward: 300
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0
snowplay:
friendlyname: 'Snow Play!'
description: 'Build a snow golem'
icon: SNOWBALL
level: 'Advanced'
type: island
requiredItems: 'SNOWMAN:1'
takeItems: false
itemReward: 'DIAMOND_SHOVEL:1'
rewardText: 'A diamond spade - get shoveling!'
moneyReward: 300
expReward: 300
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0
itsaparty:
friendlyname: "It's a party"
description: 'Have a party! Invite 4 friends.'
icon: PUMPKIN_PIE
level: 'Advanced'
type: island
requiredItems: 'PLAYER:5'
takeItems: false
itemReward: 'EMERALD:6 PUMPKIN_PIE:6'
rewardText: '6 Emeralds, 6 pumpkin pies'
moneyReward: 200
expReward: 200
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0
itsamonsterparty:
friendlyname: "It's a Monster Party"
description: 'Have a party - all monsters invited! Get close to a Skeleton, Zombie, Spider, Creeper and Enderman all at the same time.'
icon: SKELETON_SKULL
level: 'Advanced'
type: island
requiredItems: 'SKELETON:1 ZOMBIE:1 SPIDER:1 CREEPER:1 ENDERMAN:1'
takeItems: false
itemReward: 'SKELETON_SKULL:1 ZOMBIE_HEAD:1 CREEPER_HEAD:1'
rewardText: 'Skulls!'
moneyReward: 200
expReward: 400
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0
acidduke:
friendlyname: 'Arch Duke'
description: 'Achieve an island level of 1000'
icon: DIAMOND_BLOCK
level: 'Elite'
type: level
requiredItems: 1000
takeItems: false
itemReward: 'DIAMOND:1'
rewardText: '1 diamond'
moneyReward: 250
expReward: 250
permissionReward: ''
repeatable: false
repeatItemReward: ''
repeatRewardText: ''
repeatMoneyReward: 0
repeatExpReward: 0

View File

@ -68,8 +68,6 @@ challenges:
delete-challenge: 'Remove challenge'
delete-level: 'Remove level'
import: 'Import ASkyblock Challenges'
backward: 'Import 0.3.0 Challenges'
backward-player: 'Fix 0.3.0 PlayerData'
settings: 'Edit Settings'
properties: 'Properties'
requirements: 'Requirements'
@ -155,7 +153,7 @@ challenges:
increase: 'Increase operation. Clicking on numbers will increase value by selected number.'
reduce: 'Reduce operation. Clicking on numbers will reduce value by selected number.'
multiply: 'Multiply operation. Clicking on numbers will multiply value by selected number.'
import: 'Allows to import ASkyblock Challenges.|On right click it enables/disables overwrite mode.'
import: 'Allows to import ASkyblock Challenges.|On right click it enables/disables overwrite mode.|Place Challenges.yml inside ./BentoBox/addons/Challenges folder.'
complete: 'Allows to complete challenges for any user.|User will not get reward for completion.'
reset: 'Allows to reset completed user challenges.|Right click enables/disables Reset all functionality.'
create-challenge: 'Allows to add new Challenge.|By default it will be in free challenges list.'
@ -164,8 +162,6 @@ challenges:
edit-level: 'Allows to edit any Level settings.'
delete-challenge: 'Allows remove any Challenge.'
delete-level: 'Allows remove any Level.'
backward: 'Allows to import challenges from 0.3.0 and below addon version.'
backward-player: 'Allows to fix corrupted PlayerData from 0.3.0 version.|&2USE ONLY IF NECESSARY|&2MAY NOT WORK IN ALL SITUATIONS'
settings: 'Allows to change addon settings.'
properties: 'Allows to change general properties'
requirements: 'Allows to manage requirements'