diff --git a/build.gradle b/build.gradle index 078c3ee..cbb6749 100644 --- a/build.gradle +++ b/build.gradle @@ -46,7 +46,7 @@ allprojects { } dependencies { - compileOnly 'com.willfp:eco:5.2.0' + compileOnly 'com.willfp:eco:5.6.0' compileOnly 'org.jetbrains:annotations:19.0.0' diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/EcoArmorPlugin.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/EcoArmorPlugin.java index bf20328..b8a513c 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/EcoArmorPlugin.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/EcoArmorPlugin.java @@ -5,10 +5,12 @@ import com.willfp.eco.core.EcoPlugin; import com.willfp.eco.core.command.AbstractCommand; import com.willfp.eco.core.display.DisplayModule; import com.willfp.eco.core.integrations.IntegrationLoader; +import com.willfp.ecoarmor.commands.CommandEaeditor; import com.willfp.ecoarmor.commands.CommandEagive; import com.willfp.ecoarmor.commands.CommandEareload; import com.willfp.ecoarmor.commands.TabcompleterEagive; import com.willfp.ecoarmor.conditions.Conditions; +import com.willfp.ecoarmor.config.EcoArmorJson; import com.willfp.ecoarmor.display.ArmorDisplay; import com.willfp.ecoarmor.effects.Effect; import com.willfp.ecoarmor.effects.Effects; @@ -36,12 +38,20 @@ public class EcoArmorPlugin extends EcoPlugin { @Getter private static EcoArmorPlugin instance; + /** + * tiers.json. + */ + @Getter + private final EcoArmorJson ecoArmorJson; + /** * Internal constructor called by bukkit on plugin load. */ public EcoArmorPlugin() { super("EcoArmor", 88246, 10002, "com.willfp.ecoarmor.proxy", "&c"); instance = this; + + this.ecoArmorJson = new EcoArmorJson(this); } /** @@ -117,7 +127,8 @@ public class EcoArmorPlugin extends EcoPlugin { public List getCommands() { return Arrays.asList( new CommandEareload(this), - new CommandEagive(this) + new CommandEagive(this), + new CommandEaeditor(this) ); } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEaeditor.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEaeditor.java new file mode 100644 index 0000000..de0d991 --- /dev/null +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEaeditor.java @@ -0,0 +1,49 @@ +package com.willfp.ecoarmor.commands; + +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.command.AbstractCommand; +import com.willfp.eco.util.StringUtils; +import org.bukkit.command.CommandSender; +import org.jetbrains.annotations.NotNull; + +import java.util.List; + +public class CommandEaeditor extends AbstractCommand { + /** + * Instantiate a new /eaeditor command handler. + * + * @param plugin The plugin for the commands to listen for. + */ + public CommandEaeditor(@NotNull final EcoPlugin plugin) { + super(plugin, "eaeditor", "ecoarmor.editor", false); + } + + @Override + public void onExecute(@NotNull final CommandSender sender, + @NotNull final List args) { + /* + JSONConfig config = ((EcoArmorPlugin) this.getPlugin()).getEcoArmorJson().clone(); + Map meta = new HashMap<>(); + + List enchants = Arrays.stream(Enchantment.values()).map(Enchantment::getKey).map(NamespacedKey::getKey).collect(Collectors.toList()); + meta.put("enchants", enchants); + + List potionEffects = Arrays.stream(PotionEffectType.values()).map(PotionEffectType::getName).collect(Collectors.toList()); + meta.put("potion-effects", potionEffects); + + List effects = Effects.values().stream().map(Effect::getName).collect(Collectors.toList()); + meta.put("effects", effects); + + List conditions = Conditions.values().stream().map(Condition::getName).collect(Collectors.toList()); + meta.put("conditions", conditions); + + config.set("meta", meta); + String token = new Paste(config.toPlaintext()).getHastebinToken(); + String message = this.getPlugin().getLangYml().getMessage("open-editor") + .replace("%url%", "https://auxilor.io/editor/ecoarmor?token=" + token); + sender.sendMessage(message); + */ + + sender.sendMessage(StringUtils.translate("&cThe editor is coming soon!")); + } +} diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEagive.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEagive.java index e748222..a8cacdf 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEagive.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEagive.java @@ -127,7 +127,7 @@ public class CommandEagive extends AbstractCommand { } if (tier == null) { - tier = Tiers.DEFAULT; + tier = Tiers.getDefaultTier(); } for (ArmorSlot slot : slots) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/BaseEcoArmorConfig.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/BaseEcoArmorConfig.java deleted file mode 100644 index 0affa15..0000000 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/BaseEcoArmorConfig.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.willfp.ecoarmor.config; - -import com.willfp.eco.core.config.ExtendableConfig; -import com.willfp.ecoarmor.EcoArmorPlugin; -import org.jetbrains.annotations.NotNull; - -public class BaseEcoArmorConfig extends ExtendableConfig { - /** - * Create new ArmorSet config. - * - * @param configName The name of the config. - */ - public BaseEcoArmorConfig(@NotNull final String configName) { - super(configName, true, EcoArmorPlugin.getInstance(), EcoArmorPlugin.class, "sets/"); - } -} diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/BaseTierConfig.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/BaseTierConfig.java deleted file mode 100644 index 9644bc3..0000000 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/BaseTierConfig.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.willfp.ecoarmor.config; - -import com.willfp.eco.core.config.ExtendableConfig; -import com.willfp.ecoarmor.EcoArmorPlugin; -import org.jetbrains.annotations.NotNull; - -public class BaseTierConfig extends ExtendableConfig { - /** - * Create new ArmorSet config. - * - * @param configName The name of the config. - */ - public BaseTierConfig(@NotNull final String configName) { - super(configName, true, EcoArmorPlugin.getInstance(), EcoArmorPlugin.class, "tiers/"); - } -} diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/CustomConfig.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/CustomConfig.java deleted file mode 100644 index 877c8b0..0000000 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/CustomConfig.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.willfp.ecoarmor.config; - -import com.willfp.eco.core.config.YamlConfig; -import org.bukkit.configuration.file.YamlConfiguration; -import org.jetbrains.annotations.NotNull; - -public class CustomConfig extends YamlConfig { - /** - * The config name. - */ - private final String configName; - - /** - * Create new custom config. - * - * @param configName The name of the config. - * @param config The config. - */ - public CustomConfig(@NotNull final String configName, - @NotNull final YamlConfiguration config) { - super(config); - this.configName = configName; - } -} diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/EcoArmorJson.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/EcoArmorJson.java new file mode 100644 index 0000000..e29b167 --- /dev/null +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/EcoArmorJson.java @@ -0,0 +1,16 @@ +package com.willfp.ecoarmor.config; + +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.config.JsonStaticBaseConfig; +import org.jetbrains.annotations.NotNull; + +public class EcoArmorJson extends JsonStaticBaseConfig { + /** + * Create tiers.json. + * + * @param plugin Instance of EcoArmor. + */ + public EcoArmorJson(@NotNull final EcoPlugin plugin) { + super("ecoarmor", plugin); + } +} diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/ArmorSet.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/ArmorSet.java index c3cf7df..3e0fdb7 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/ArmorSet.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/ArmorSet.java @@ -1,13 +1,15 @@ package com.willfp.ecoarmor.sets; +import com.willfp.eco.core.EcoPlugin; import com.willfp.eco.core.config.Config; +import com.willfp.eco.core.config.JSONConfig; import com.willfp.eco.core.display.Display; import com.willfp.eco.core.items.CustomItem; -import com.willfp.eco.core.items.Items; -import com.willfp.eco.core.recipe.recipes.ShapedCraftingRecipe; -import com.willfp.eco.util.SkullUtils; -import com.willfp.eco.util.StringUtils; -import com.willfp.ecoarmor.EcoArmorPlugin; +import com.willfp.eco.core.items.builder.ItemBuilder; +import com.willfp.eco.core.items.builder.ItemStackBuilder; +import com.willfp.eco.core.items.builder.LeatherArmorBuilder; +import com.willfp.eco.core.items.builder.SkullBuilder; +import com.willfp.eco.core.recipe.Recipes; import com.willfp.ecoarmor.conditions.Condition; import com.willfp.ecoarmor.conditions.Conditions; import com.willfp.ecoarmor.effects.Effect; @@ -19,16 +21,12 @@ import com.willfp.ecoarmor.upgrades.Tiers; import lombok.AccessLevel; import lombok.Getter; import org.bukkit.Bukkit; -import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import org.bukkit.inventory.meta.LeatherArmorMeta; -import org.bukkit.inventory.meta.SkullMeta; -import org.bukkit.persistence.PersistentDataContainer; import org.bukkit.persistence.PersistentDataType; import org.bukkit.potion.PotionEffectType; import org.jetbrains.annotations.NotNull; @@ -39,13 +37,21 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.stream.Collectors; @SuppressWarnings("unchecked") public class ArmorSet { /** * Instance of EcoArmor. */ - private static final EcoArmorPlugin PLUGIN = EcoArmorPlugin.getInstance(); + @Getter(AccessLevel.PRIVATE) + private final EcoPlugin plugin; + + /** + * The config of the set. + */ + @Getter(AccessLevel.PRIVATE) + private final JSONConfig config; /** * The name of the set. @@ -53,12 +59,6 @@ public class ArmorSet { @Getter private final String name; - /** - * The config of the set. - */ - @Getter(AccessLevel.PRIVATE) - private final Config config; - /** * Conditions and their values. */ @@ -117,237 +117,178 @@ public class ArmorSet { /** * Create a new Armor Set. * - * @param name The name of the set. * @param config The set's config. + * @param plugin Instance of EcoArmor. */ - public ArmorSet(@NotNull final String name, - @NotNull final Config config) { + public ArmorSet(@NotNull final JSONConfig config, + @NotNull final EcoPlugin plugin) { this.config = config; - this.name = name; + this.plugin = plugin; + this.name = config.getString("name"); - for (String definedKey : this.getConfig().getStrings("conditions")) { - String[] split = definedKey.split(":"); - String key = split[0].trim(); - String value = split[1].trim(); - Condition condition = Conditions.getByName(key); - if (condition == null) { - Bukkit.getLogger().warning("Invalid condition specified in " + this.name); - } else { - conditions.put(condition, ArmorUtils.getConditionValue(value, condition)); - } + for (JSONConfig cfg : this.getConfig().getSubsections("conditions")) { + Condition effect = Conditions.getByName(cfg.getString("id")); + Object value = cfg.get("args"); + conditions.put(effect, value); } - for (String definedKey : this.getConfig().getStrings("set-bonus")) { - String[] split = definedKey.split(":"); - String key = split[0].trim(); - String value = split[1].trim(); - Effect effect = Effects.getByName(key); - if (effect == null) { - Bukkit.getLogger().warning("Invalid effect specified in " + this.name); - } else { - effects.put(effect, ArmorUtils.getEffectValue(value, effect)); - } + for (JSONConfig cfg : this.getConfig().getSubsections("effects")) { + Effect effect = Effects.getByName(cfg.getString("id")); + Object value = cfg.get("args"); + effects.put(effect, value); } - for (String definedKey : this.getConfig().getStrings("advanced-set-bonus")) { - String[] split = definedKey.split(":"); - String key = split[0].trim(); - String value = split[1].trim(); - Effect effect = Effects.getByName(key); - if (effect == null) { - Bukkit.getLogger().warning("Invalid advanced effect specified in " + this.name); - } else { - advancedEffects.put(effect, ArmorUtils.getEffectValue(value, effect)); - } + for (JSONConfig cfg : this.getConfig().getSubsections("advancedEffects")) { + Effect effect = Effects.getByName(cfg.getString("id")); + Object value = cfg.get("args"); + advancedEffects.put(effect, value); } - for (String definedKey : this.getConfig().getStrings("potion-effects")) { - String[] split = definedKey.split(":"); - String key = split[0].trim(); - String value = split[1].trim(); - PotionEffectType type = PotionEffectType.getByName(key.toUpperCase()); - if (type == null) { - Bukkit.getLogger().warning("Invalid potion effect specified in " + this.name); - } else { - potionEffects.put(type, Integer.parseInt(value)); - } + for (JSONConfig cfg : this.getConfig().getSubsections("potionEffects")) { + PotionEffectType effect = PotionEffectType.getByName(cfg.getString("id").toUpperCase()); + int level = cfg.getInt("level"); + potionEffects.put(effect, level); } - for (String definedKey : this.getConfig().getStrings("advanced-potion-effects")) { - String[] split = definedKey.split(":"); - String key = split[0].trim(); - String value = split[1].trim(); - PotionEffectType type = PotionEffectType.getByName(key.toUpperCase()); - if (type == null) { - Bukkit.getLogger().warning("Invalid advanced potion effect specified in " + this.name); - } else { - advancedPotionEffects.put(type, Integer.parseInt(value)); - } + for (JSONConfig cfg : this.getConfig().getSubsections("advancedPotionEffects")) { + PotionEffectType effect = PotionEffectType.getByName(cfg.getString("id").toUpperCase()); + int level = cfg.getInt("level"); + advancedPotionEffects.put(effect, level); } for (ArmorSlot slot : ArmorSlot.values()) { - ItemStack item = construct(slot, this.getConfig().getSubsection(slot.name().toLowerCase()), false); + ItemStack item = construct(slot, (JSONConfig) this.getConfig().getSubsection(slot.name().toLowerCase()), false); items.put(slot, item); if (this.getConfig().getBool("enabled")) { constructRecipe(slot, this.getConfig().getSubsection(slot.name().toLowerCase()), item); } - ItemStack advancedItem = construct(slot, this.getConfig().getSubsection(slot.name().toLowerCase()), true); + ItemStack advancedItem = construct(slot, (JSONConfig) this.getConfig().getSubsection(slot.name().toLowerCase()), true); advancedItems.put(slot, advancedItem); } - if (this.getConfig().getBool("enabled")) { - ArmorSets.addNewSet(this); - } - this.advancementShardItem = constructShard(); } private ItemStack constructShard() { - ItemStack shardItem = new ItemStack(Objects.requireNonNull(Material.getMaterial(PLUGIN.getConfigYml().getString("advancement-shard-material").toUpperCase()))); - ItemMeta shardMeta = shardItem.getItemMeta(); - assert shardMeta != null; - shardMeta.setDisplayName(this.getConfig().getString("advancement-shard-name")); + ItemStack shard = new ItemStackBuilder(Objects.requireNonNull(Material.getMaterial(this.getPlugin().getConfigYml().getString("advancement-shard-material").toUpperCase()))) + .setDisplayName(this.getConfig().getString("advancementShardName")) + .addEnchantment(Enchantment.DURABILITY, 3) + .addItemFlag(ItemFlag.HIDE_ENCHANTS) + .addLoreLines(this.getConfig().getStrings("advancementShardLore")) + .writeMetaKey(this.getPlugin().getNamespacedKeyFactory().create("advancementShard"), PersistentDataType.STRING, name) + .build(); - shardMeta.addEnchant(Enchantment.DURABILITY, 3, true); - shardMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS); - - List shardLore = new ArrayList<>(); - for (String loreLine : this.getConfig().getStrings("advancement-shard-lore")) { - shardLore.add(Display.PREFIX + StringUtils.translate(loreLine)); + if (this.getConfig().getBool("shardCraftable")) { + Recipes.createAndRegisterRecipe(this.getPlugin(), + this.getName() + "_shard", + shard, + this.getConfig().getStrings("shardRecipe")); } - shardMeta.setLore(shardLore); - shardMeta.getPersistentDataContainer().set(PLUGIN.getNamespacedKeyFactory().create("advancement-shard"), PersistentDataType.STRING, name); - - shardItem.setItemMeta(shardMeta); - - if (this.getConfig().getBool("shard-craftable")) { - ShapedCraftingRecipe.Builder builder = ShapedCraftingRecipe.builder(PLUGIN, this.getName() + "_shard").setOutput(shardItem); - - List recipeStrings = this.getConfig().getStrings("shard-recipe"); - - for (int i = 0; i < 9; i++) { - builder.setRecipePart(i, Items.lookup(recipeStrings.get(i))); - } - - ShapedCraftingRecipe recipe = builder.build(); - recipe.register(); - } - - return shardItem; + return shard; } private ItemStack construct(@NotNull final ArmorSlot slot, - @NotNull final Config slotConfig, + @NotNull final JSONConfig slotConfig, final boolean advanced) { Material material = Material.getMaterial(slotConfig.getString("material").toUpperCase()); - Map enchants = new HashMap<>(); - - for (String definedKey : slotConfig.getStrings("enchants")) { - String[] split = definedKey.split(":"); - String key = split[0].trim(); - String value = split[1].trim(); - Enchantment enchantment = Enchantment.getByKey(NamespacedKey.minecraft(key)); - if (enchantment == null) { - Bukkit.getLogger().warning("Invalid enchantment specified in " + this.name + " " + slot.name().toLowerCase()); - } else { - enchants.put(enchantment, Integer.valueOf(value)); - } - } assert material != null; - ItemStack itemStack = new ItemStack(material); - ItemMeta meta = itemStack.getItemMeta(); + ItemBuilder builder; - assert meta != null; + builder = switch (material) { + case PLAYER_HEAD -> new SkullBuilder(); + case LEATHER_HELMET, LEATHER_CHESTPLATE, LEATHER_LEGGINGS, LEATHER_BOOTS -> new LeatherArmorBuilder(material); + default -> new ItemStackBuilder(material); + }; - String displayName; - if (advanced) { - displayName = slotConfig.getString("advanced-name"); - } else { - displayName = slotConfig.getString("name"); + builder.setDisplayName(advanced ? slotConfig.getString("advancedName") : slotConfig.getString("name")) + .addItemFlag( + slotConfig.getStrings("flags").stream() + .map(s -> ItemFlag.valueOf(s.toUpperCase())) + .toArray(ItemFlag[]::new) + ) + .setUnbreakable(slotConfig.getBool("unbreakable")) + .addLoreLines(slotConfig.getStrings("lore").stream().map(s -> Display.PREFIX + s).collect(Collectors.toList())) + .addLoreLines(() -> { + if (advanced) { + return slotConfig.getStrings("advancedLore").stream().map(s -> Display.PREFIX + s).collect(Collectors.toList()); + } else { + return null; + } + }) + .setCustomModelData(() -> { + int data = slotConfig.getInt("customModelData"); + return data != -1 ? data : null; + }) + .setDisplayName(() -> advanced ? slotConfig.getString("advancedName") : slotConfig.getString("name")); + + + if (builder instanceof SkullBuilder skullBuilder) { + this.skullBase64 = slotConfig.getString("skullTexture"); + skullBuilder.setSkullTexture(skullBase64); } - List flags = new ArrayList<>(); - for (String flagName : slotConfig.getStrings("flags")) { - ItemFlag flag = ItemFlag.valueOf(flagName.toUpperCase()); - flags.add(flag); - } - meta.addItemFlags(flags.toArray(new ItemFlag[0])); - - int data = slotConfig.getInt("custom-model-data"); - if (data != -1) { - meta.setCustomModelData(data); - } - - boolean unbreakable = slotConfig.getBool("unbreakable"); - meta.setUnbreakable(unbreakable); - - List lore = new ArrayList<>(); - for (String loreLine : slotConfig.getStrings("lore")) { - lore.add(Display.PREFIX + StringUtils.translate(loreLine)); - } - - if (advanced) { - for (String loreLine : this.getConfig().getStrings("advanced-lore")) { - lore.add(Display.PREFIX + StringUtils.translate(loreLine)); - } - } - - if (meta instanceof SkullMeta) { - this.skullBase64 = slotConfig.getString("skull-texture"); - SkullUtils.setSkullTexture((SkullMeta) meta, skullBase64); - } - - if (meta instanceof LeatherArmorMeta) { - String colorString = slotConfig.getString("leather-color"); + if (builder instanceof LeatherArmorBuilder leatherArmorBuilder) { + String colorString = slotConfig.getString("leatherColor"); java.awt.Color awtColor = java.awt.Color.decode(colorString); - Color color = Color.fromRGB(awtColor.getRed(), awtColor.getGreen(), awtColor.getBlue()); - ((LeatherArmorMeta) meta).setColor(color); - - meta.addItemFlags(ItemFlag.HIDE_DYE); + leatherArmorBuilder.setColor(awtColor); + builder.addItemFlag(ItemFlag.HIDE_DYE); } - meta.setDisplayName(displayName); - meta.setLore(lore); + Map enchants = new HashMap<>(); - enchants.forEach((enchantment, integer) -> meta.addEnchant(enchantment, integer, true)); - PersistentDataContainer container = meta.getPersistentDataContainer(); - container.set(PLUGIN.getNamespacedKeyFactory().create("set"), PersistentDataType.STRING, name); - container.set(PLUGIN.getNamespacedKeyFactory().create("effective-durability"), PersistentDataType.INTEGER, slotConfig.getInt("effective-durability")); - itemStack.setItemMeta(meta); + for (JSONConfig enchantSection : slotConfig.getSubsections("enchants")) { + Enchantment enchantment = Enchantment.getByKey(NamespacedKey.minecraft(enchantSection.getString("id"))); + int level = enchantSection.getInt("level"); + enchants.put(enchantment, level); + } + + enchants.forEach(builder::addEnchantment); + + builder.writeMetaKey( + this.getPlugin().getNamespacedKeyFactory().create("set"), + PersistentDataType.STRING, + name + ).writeMetaKey( + this.getPlugin().getNamespacedKeyFactory().create("effective-durability"), + PersistentDataType.INTEGER, + slotConfig.getInt("effectiveDurability") + ); + + ItemStack itemStack = builder.build(); ArmorUtils.setAdvanced(itemStack, advanced); - Tier defaultTier = Tiers.getByName(slotConfig.getString("default-tier")); + Tier defaultTier = Tiers.getByName(slotConfig.getString("defaultTier")); if (defaultTier == null) { Bukkit.getLogger().warning("Default tier specified in " + this.name + " " + slot.name().toLowerCase() + " is invalid! Defaulting to 'default'"); - ArmorUtils.setTier(itemStack, Tiers.DEFAULT); + ArmorUtils.setTier(itemStack, Tiers.getDefaultTier()); } else { ArmorUtils.setTier(itemStack, defaultTier); } if (advanced) { - new CustomItem(PLUGIN.getNamespacedKeyFactory().create("set_" + name.toLowerCase() + "_" + slot.name().toLowerCase() + "_advanced"), test -> { + new CustomItem(this.getPlugin().getNamespacedKeyFactory().create("set_" + name.toLowerCase() + "_" + slot.name().toLowerCase() + "_advanced"), test -> { if (ArmorSlot.getSlot(test) != ArmorSlot.getSlot(itemStack)) { return false; } if (!ArmorUtils.isAdvanced(itemStack)) { return false; } - return Objects.equals(this, ArmorUtils.getSetOnItem(test)); + return Objects.equals(this.getName(), ArmorUtils.getSetOnItem(test).getName()); }, itemStack).register(); } else { - new CustomItem(PLUGIN.getNamespacedKeyFactory().create("set_" + name.toLowerCase() + "_" + slot.name().toLowerCase()), test -> { + new CustomItem(this.getPlugin().getNamespacedKeyFactory().create("set_" + name.toLowerCase() + "_" + slot.name().toLowerCase()), test -> { if (ArmorSlot.getSlot(test) != ArmorSlot.getSlot(itemStack)) { return false; } if (ArmorUtils.isAdvanced(itemStack)) { return false; } - return Objects.equals(this, ArmorUtils.getSetOnItem(test)); + return Objects.equals(this.getName(), ArmorUtils.getSetOnItem(test).getName()); }, itemStack).register(); } @@ -366,23 +307,19 @@ public class ArmorSet { List lore = new ArrayList<>(); for (String s : meta.getLore()) { - s = s.replace("%tier%", Tiers.DEFAULT.getDisplayName()); + s = s.replace("%tier%", Tiers.getDefaultTier().getDisplayName()); lore.add(s); } meta.setLore(lore); formattedOut.setItemMeta(meta); - ShapedCraftingRecipe.Builder builder = ShapedCraftingRecipe.builder(PLUGIN, this.getName() + "_" + slot.name().toLowerCase()).setOutput(formattedOut); - - List recipeStrings = slotConfig.getStrings("recipe"); - - for (int i = 0; i < 9; i++) { - builder.setRecipePart(i, Items.lookup(recipeStrings.get(i))); - } - - ShapedCraftingRecipe recipe = builder.build(); - recipe.register(); + Recipes.createAndRegisterRecipe( + this.getPlugin(), + this.getName() + "_" + slot.name().toLowerCase(), + formattedOut, + slotConfig.getStrings("recipe") + ); } } @@ -455,23 +392,22 @@ public class ArmorSet { return true; } - if (!(o instanceof ArmorSet)) { + if (!(o instanceof ArmorSet set)) { return false; } - ArmorSet set = (ArmorSet) o; - return this.getName().equals(set.getName()); + return this.name.equals(set.name); } @Override public int hashCode() { - return Objects.hash(this.getName()); + return Objects.hash(this.name); } @Override public String toString() { return "ArmorSet{" - + this.getName() + + this.name + "}"; } } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/ArmorSets.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/ArmorSets.java index f107dd2..3b70e98 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/ArmorSets.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/ArmorSets.java @@ -5,19 +5,12 @@ import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; import com.willfp.eco.core.config.ConfigUpdater; +import com.willfp.eco.core.config.JSONConfig; import com.willfp.ecoarmor.EcoArmorPlugin; -import com.willfp.ecoarmor.config.BaseEcoArmorConfig; -import com.willfp.ecoarmor.config.CustomConfig; import lombok.experimental.UtilityClass; -import org.bukkit.configuration.file.YamlConfiguration; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.Arrays; import java.util.List; @UtilityClass @@ -27,16 +20,6 @@ public class ArmorSets { */ private static final BiMap BY_NAME = HashBiMap.create(); - /** - * Sets that exist by default. - */ - private static final List DEFAULT_SET_NAMES = Arrays.asList( - "miner", - "reaper", - "ender", - "young" - ); - /** * Get all registered {@link ArmorSet}s. * @@ -59,29 +42,17 @@ public class ArmorSets { /** * Update all {@link ArmorSet}s. + * + * @param plugin Instance of EcoArmor. */ @ConfigUpdater - public static void update() { + public static void update(@NotNull final EcoArmorPlugin plugin) { for (ArmorSet set : values()) { removeSet(set); } - for (String defaultSetName : DEFAULT_SET_NAMES) { - new ArmorSet(defaultSetName, new BaseEcoArmorConfig(defaultSetName)); - } - - try { - Files.walk(Paths.get(new File(EcoArmorPlugin.getInstance().getDataFolder(), "sets/").toURI())) - .filter(Files::isRegularFile) - .forEach(path -> { - String name = path.getFileName().toString().replace(".yml", ""); - new ArmorSet( - name, - new CustomConfig(name, YamlConfiguration.loadConfiguration(path.toFile())) - ); - }); - } catch (IOException e) { - e.printStackTrace(); + for (JSONConfig setConfig : plugin.getEcoArmorJson().getSubsections("sets")) { + addNewSet(new ArmorSet(setConfig, plugin)); } } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/util/ArmorUtils.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/util/ArmorUtils.java index 165969a..3a9b119 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/util/ArmorUtils.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/util/ArmorUtils.java @@ -2,7 +2,6 @@ package com.willfp.ecoarmor.sets.util; import com.willfp.ecoarmor.EcoArmorPlugin; import com.willfp.ecoarmor.conditions.Condition; -import com.willfp.ecoarmor.effects.Effect; import com.willfp.ecoarmor.sets.ArmorSet; import com.willfp.ecoarmor.sets.ArmorSets; import com.willfp.ecoarmor.sets.meta.ArmorSlot; @@ -179,8 +178,8 @@ public class ArmorUtils { Tier tier = getTier(meta); if (getSetOnItem(meta) != null && tier == null) { - setTier(itemStack, Tiers.DEFAULT); - return Tiers.DEFAULT; + setTier(itemStack, Tiers.getDefaultTier()); + return Tiers.getDefaultTier(); } else { return tier; } @@ -402,56 +401,4 @@ public class ArmorUtils { return ArmorSets.getByName(shardSet); } - - /** - * Get value of effect. - * - * @param string Value as string. - * @param effect Effect. - * @param The type of the effect. - * @return Value. - */ - @NotNull - public static Object getEffectValue(@NotNull final String string, - @NotNull final Effect effect) { - if (effect.getTypeClass().equals(Boolean.class)) { - return Boolean.parseBoolean(string); - } - - if (effect.getTypeClass().equals(Integer.class)) { - return Integer.parseInt(string); - } - - if (effect.getTypeClass().equals(Double.class)) { - return Double.parseDouble(string); - } - - return string; - } - - /** - * Get value of condition. - * - * @param string Value as string. - * @param condition Condition. - * @param The type of the condition. - * @return Value. - */ - @NotNull - public static Object getConditionValue(@NotNull final String string, - @NotNull final Condition condition) { - if (condition.getTypeClass().equals(Boolean.class)) { - return Boolean.parseBoolean(string); - } - - if (condition.getTypeClass().equals(Integer.class)) { - return Integer.parseInt(string); - } - - if (condition.getTypeClass().equals(Double.class)) { - return Double.parseDouble(string); - } - - return string; - } } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/upgrades/Tier.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/upgrades/Tier.java index c2e93cc..aaa3cd5 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/upgrades/Tier.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/upgrades/Tier.java @@ -3,6 +3,7 @@ package com.willfp.ecoarmor.upgrades; import com.willfp.eco.core.EcoPlugin; import com.willfp.eco.core.PluginDependent; import com.willfp.eco.core.config.Config; +import com.willfp.eco.core.config.JSONConfig; import com.willfp.eco.core.display.Display; import com.willfp.eco.core.items.CustomItem; import com.willfp.eco.core.items.Items; @@ -56,7 +57,7 @@ public class Tier extends PluginDependent { * If the crafting recipe is enabled. */ @Getter - private boolean enabled; + private boolean craftable; /** * The ItemStack of the crystal. @@ -79,21 +80,15 @@ public class Tier extends PluginDependent { /** * Create a new Tier. * - * @param tierName The name of the tier. - * @param config The config of the tier. - * @param plugin Instance of EcoArmor. + * @param config The config of the tier. + * @param plugin Instance of EcoArmor. */ - public Tier(@NotNull final String tierName, - @NotNull final Config config, + public Tier(@NotNull final JSONConfig config, @NotNull final EcoPlugin plugin) { super(plugin); - this.name = tierName; + this.name = config.getString("name"); this.config = config; - if (!this.config.getBool("enabled") && !this.getName().equalsIgnoreCase("default")) { - return; - } - Tiers.addNewTier(this); this.update(); } @@ -101,9 +96,9 @@ public class Tier extends PluginDependent { * Update the tracker's crafting recipe. */ public void update() { - this.enabled = this.getConfig().getBool("crystal-craftable"); + this.craftable = this.getConfig().getBool("crystal.craftable"); this.displayName = this.getConfig().getString("display"); - this.requiredTiersForApplication = this.getConfig().getStrings("requires-tiers"); + this.requiredTiersForApplication = this.getConfig().getStrings("requiresTiers"); NamespacedKey key = this.getPlugin().getNamespacedKeyFactory().create("upgrade_crystal"); ItemStack out = new ItemStack(Objects.requireNonNull(Material.getMaterial(this.getPlugin().getConfigYml().getString("upgrade-crystal-material").toUpperCase()))); @@ -112,10 +107,10 @@ public class Tier extends PluginDependent { PersistentDataContainer container = outMeta.getPersistentDataContainer(); container.set(key, PersistentDataType.STRING, name); - outMeta.setDisplayName(this.getConfig().getString("crystal-name")); + outMeta.setDisplayName(this.getConfig().getString("crystal.name")); List lore = new ArrayList<>(); - for (String loreLine : this.getConfig().getStrings("crystal-lore")) { + for (String loreLine : this.getConfig().getStrings("crystal.lore")) { lore.add(Display.PREFIX + StringUtils.translate(loreLine)); } outMeta.setLore(lore); @@ -128,21 +123,21 @@ public class Tier extends PluginDependent { properties.put(slot, new TierProperties( this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".armor"), this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".toughness"), - this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".knockback-resistance"), - this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".speed-percentage"), - this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".attack-speed-percentage"), - this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".attack-damage-percentage"), - this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".attack-knockback-percentage") + this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".knockbackResistance"), + this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".speedPercentage"), + this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".attackSpeedPercentage"), + this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".attackDamagePercentage"), + this.getConfig().getInt("properties." + slot.name().toLowerCase() + ".attackKnockbackPercentage") )); } - if (this.isEnabled()) { + if (this.isCraftable()) { ItemStack recipeOut = out.clone(); - recipeOut.setAmount(this.getConfig().getInt("recipe-give-amount")); + recipeOut.setAmount(this.getConfig().getInt("crystal.giveAmount")); ShapedCraftingRecipe.Builder builder = ShapedCraftingRecipe.builder(this.getPlugin(), "upgrade_crystal_" + name) .setOutput(recipeOut); - List recipeStrings = this.getConfig().getStrings("crystal-recipe"); + List recipeStrings = this.getConfig().getStrings("crystal.recipe"); new CustomItem(this.getPlugin().getNamespacedKeyFactory().create("upgrade_crystal_" + name), test -> { if (test == null) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/upgrades/Tiers.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/upgrades/Tiers.java index c117e50..ff44169 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/upgrades/Tiers.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/upgrades/Tiers.java @@ -4,50 +4,27 @@ import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; import com.willfp.eco.core.config.ConfigUpdater; +import com.willfp.eco.core.config.JSONConfig; import com.willfp.ecoarmor.EcoArmorPlugin; -import com.willfp.ecoarmor.config.BaseTierConfig; -import com.willfp.ecoarmor.config.CustomConfig; +import lombok.Getter; import lombok.experimental.UtilityClass; -import org.bukkit.configuration.file.YamlConfiguration; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.Arrays; import java.util.List; @UtilityClass public class Tiers { - /** - * Instance of EcoArmor. - */ - private static final EcoArmorPlugin PLUGIN = EcoArmorPlugin.getInstance(); - /** * Registered tiers. */ private static final BiMap BY_NAME = HashBiMap.create(); - /** - * Tiers that exist by default. - */ - private static final List DEFAULT_TIER_NAMES = Arrays.asList( - "iron", - "diamond", - "netherite", - "manyullyn", - "cobalt", - "osmium", - "exotic" - ); - /** * Default tier. */ - public static final Tier DEFAULT = new Tier("default", new BaseTierConfig("default"), PLUGIN); + @Getter + private static Tier defaultTier; /** * Get {@link Tiers} matching name. @@ -81,32 +58,21 @@ public class Tiers { /** * Update. + * + * @param plugin Instance of EcoArmor. */ @ConfigUpdater - public static void reload() { + public static void reload(@NotNull final EcoArmorPlugin plugin) { BY_NAME.clear(); - for (String defaultSetName : DEFAULT_TIER_NAMES) { - new Tier(defaultSetName, new BaseTierConfig(defaultSetName), PLUGIN); + for (JSONConfig tierConfig : plugin.getEcoArmorJson().getSubsections("tiers")) { + addNewTier(new Tier(tierConfig, plugin)); } - try { - Files.walk(Paths.get(new File(EcoArmorPlugin.getInstance().getDataFolder(), "tiers/").toURI())) - .filter(Files::isRegularFile) - .forEach(path -> { - String name = path.getFileName().toString().replace(".yml", ""); - new Tier( - name, - new CustomConfig(name, YamlConfiguration.loadConfiguration(path.toFile())), - PLUGIN - ); - }); - } catch (IOException e) { - e.printStackTrace(); - } + defaultTier = Tiers.getByName("default"); } static { - reload(); + reload(EcoArmorPlugin.getInstance()); } } diff --git a/eco-core/core-plugin/src/main/resources/ecoarmor.json b/eco-core/core-plugin/src/main/resources/ecoarmor.json new file mode 100644 index 0000000..8fac11b --- /dev/null +++ b/eco-core/core-plugin/src/main/resources/ecoarmor.json @@ -0,0 +1,1633 @@ +{ + "tiers": [ + { + "name": "default", + "display": "&8&lDEFAULT", + "requiresTiers": [], + "crystal": { + "craftable": false, + "name": "&8Default Upgrade Crystal", + "recipe": [ + "air", + "leather", + "air", + "leather", + "leather_chestplate", + "leather", + "air", + "leather", + "air" + ], + "giveAmount": 1, + "lore": [ + "&8Drop this onto an armor piece", + "&8to set its tier to:", + "&8&lDEFAULT" + ] + }, + "properties": { + "helmet": { + "armor": 1, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "chestplate": { + "armor": 3, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "elytra": { + "armor": 0, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedpercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "leggings": { + "armor": 2, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "boots": { + "armor": 1, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + } + } + }, + { + "name": "iron", + "display": "&7&lIRON", + "requiresTiers": [ + "default" + ], + "crystal": { + "craftable": true, + "name": "&7Iron Upgrade Crystal", + "recipe": [ + "air", + "iron_block", + "air", + "iron_block", + "leather_chestplate", + "iron_block", + "air", + "iron_block", + "air" + ], + "giveAmount": 1, + "lore": [ + "&8Drop this onto an armor piece", + "&8to set its tier to:", + "&7&lIRON", + "", + "&8&oRequires the armor to already have default tier" + ] + }, + "properties": { + "helmet": { + "armor": 2, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "chestplate": { + "armor": 6, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "elytra": { + "armor": 2, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "leggings": { + "armor": 5, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "boots": { + "armor": 2, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + } + } + }, + { + "name": "diamond", + "display": "&b&lDIAMOND", + "requiresTiers": [ + "iron" + ], + "crystal": { + "craftable": true, + "name": "&bDiamond Upgrade Crystal", + "recipe": [ + "air", + "diamond_block", + "air", + "diamond_block", + "ecoarmor:upgrade_crystal_iron", + "diamond_block", + "air", + "diamond_block", + "air" + ], + "giveAmount": 1, + "lore": [ + "&8Drop this onto an armor piece", + "&8to set its tier to:", + "&b&lDIAMOND", + "", + "&8&oRequires the armor to already have Iron tier" + ] + }, + "properties": { + "helmet": { + "armor": 3, + "toughness": 2, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "chestplate": { + "armor": 8, + "toughness": 2, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "elytra": { + "armor": 3, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "leggings": { + "armor": 6, + "toughness": 2, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "boots": { + "armor": 3, + "toughness": 2, + "knockbackResistance": 0, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + } + } + }, + { + "name": "netherite", + "display": "&c&lNETHERITE", + "requiresTiers": [ + "diamond" + ], + "crystal": { + "craftable": true, + "name": "&cNetherite Upgrade Crystal", + "recipe": [ + "air", + "netherite_ingot", + "air", + "netherite_ingot", + "ecoarmor:upgrade_crystal_diamond", + "netherite_ingot", + "air", + "netherite_ingot", + "air" + ], + "giveAmount": 1, + "lore": [ + "&8Drop this onto an armor piece", + "&8to set its tier to:", + "&c&lNETHERITE", + "", + "&8&oRequires the armor to already have Diamond tier" + ] + }, + "properties": { + "helmet": { + "armor": 3, + "toughness": 3, + "knockbackResistance": 1, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "chestplate": { + "armor": 8, + "toughness": 3, + "knockbackResistance": 1, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "elytra": { + "armor": 3, + "toughness": 0, + "knockbackResistance": 1, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "leggings": { + "armor": 6, + "toughness": 3, + "knockbackResistance": 1, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "boots": { + "armor": 3, + "toughness": 3, + "knockbackResistance": 1, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + } + } + }, + { + "name": "manyullyn", + "enabled": true, + "display": "&d&k!!&r &lMANYULLYN&r &d&k!!&r", + "requiresTiers": [ + "netherite" + ], + "crystal": { + "craftable": true, + "name": "Manyullyn Upgrade Crystal", + "recipe": [ + "ecoarmor:upgrade_crystal_netherite", + "enchanted_golden_apple", + "ecoarmor:upgrade_crystal_netherite", + "enchanted_golden_apple", + "ecoarmor:upgrade_crystal_netherite", + "enchanted_golden_apple", + "ecoarmor:upgrade_crystal_netherite", + "enchanted_golden_apple", + "ecoarmor:upgrade_crystal_netherite" + ], + "giveAmount": 1, + "lore": [ + "&8Drop this onto an armor piece", + "&8to set its tier to:", + "&d&k!!&r &lMANYULLYN&r &d&k!!&r", + "", + "&8&oRequires the armor to already have Netherite tier" + ] + }, + "properties": { + "helmet": { + "armor": 3, + "toughness": 5, + "knockbackResistance": 2, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "chestplate": { + "armor": 8, + "toughness": 5, + "knockbackResistance": 2, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "elytra": { + "armor": 3, + "toughness": 0, + "knockbackResistance": 2, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "leggings": { + "armor": 6, + "toughness": 5, + "knockbackResistance": 2, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + }, + "boots": { + "armor": 3, + "toughness": 5, + "knockbackResistance": 2, + "speedPercentage": 0, + "attackSpeedPercentage": 0, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 0 + } + } + }, + { + "name": "cobalt", + "display": "/ab&lCOBALT", + "requiresTiers": [ + "iron" + ], + "crystal": { + "craftable": true, + "name": "/abCobalt Upgrade Crystal", + "recipe": [ + "air", + "obsidian", + "air", + "obsidian", + "ecoarmor:upgrade_crystal_iron", + "obsidian", + "air", + "obsidian", + "air" + ], + "giveAmount": 1, + "lore": [ + "&8Drop this onto an armor piece", + "&8to set its tier to:", + "/ab&lCOBALT", + "", + "&8&oRequires the armor to already have Iron tier" + ] + }, + "properties": { + "helmet": { + "armor": 3, + "toughness": 4, + "knockbackResistance": 1, + "speedPercentage": -10, + "attackSpeedPercentage": -10, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 10 + }, + "chestplate": { + "armor": 8, + "toughness": 4, + "knockbackResistance": 1, + "speedPercentage": -10, + "attackSpeedPercentage": -10, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 10 + }, + "elytra": { + "armor": 6, + "toughness": 2, + "knockbackResistance": 1, + "speedPercentage": -10, + "attackSpeedPercentage": -10, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 10 + }, + "leggings": { + "armor": 6, + "toughness": 4, + "knockbackResistance": 1, + "speedPercentage": -10, + "attackSpeedPercentage": -1, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 10 + }, + "boots": { + "armor": 3, + "toughness": 4, + "knockbackResistance": 1, + "speedPercentage": -10, + "attackSpeedPercentage": -10, + "attackDamagePercentage": 0, + "attackKnockbackPercentage": 10 + } + } + }, + { + "name": "osmium", + "display": "&b&k!!&r &lOSMIUM&r &b&k!!", + "requiresTiers": [ + "cobalt" + ], + "crystal": { + "craftable": true, + "name": "Osmium upgrade crystal", + "recipe": [ + "air", + "netherite_block", + "air", + "netherite_block", + "ecoarmor:upgrade_crystal_cobalt", + "netherite_block", + "air", + "netherite_block", + "air" + ], + "giveAmount": 1, + "lore": [ + "&8Drop this onto an armor piece", + "&8to set its tier to:", + "&b&k!!&r &lOSMIUM&r &b&k!!", + "", + "&8&oRequires the armor to already have Cobalt tier" + ] + }, + "properties": { + "helmet": { + "armor": 3, + "toughness": 6, + "knockbackResistance": 3, + "speedPercentage": -15, + "attackSpeedPercentage": -15, + "attackDamagePercentage": 5, + "attackKnockbackPercentage": 25 + }, + "chestplate": { + "armor": 8, + "toughness": 6, + "knockbackResistance": 3, + "speedPercentage": -15, + "attackSpeedPercentage": -15, + "attackDamagePercentage": 5, + "attackKnockbackPercentage": 25 + }, + "elytra": { + "armor": 8, + "toughness": 6, + "knockbackResistance": 3, + "speedPercentage": -15, + "attackSpeedPercentage": -15, + "attackDamagePercentage": 5, + "attackKnockbackPercentage": 25 + }, + "leggings": { + "armor": 6, + "toughness": 6, + "knockbackResistance": 3, + "speedPercentage": -15, + "attackSpeedPercentage": -15, + "attackDamagePercentage": 5, + "attackKnockbackPercentage": 25 + }, + "boots": { + "armor": 3, + "toughness": 6, + "knockbackResistance": 3, + "speedPercentage": -15, + "attackSpeedPercentage": -15, + "attackDamagePercentage": 5, + "attackKnockbackPercentage": 25 + } + } + }, + { + "name": "exotic", + "display": "&6&k!!&r &lEXOTIC&r &6&k!!&r", + "requiresTiers": [ + "netherite" + ], + "crystal": { + "craftable": true, + "name": "Exotic Upgrade Crystal", + "recipe": [ + "ecoarmor:upgrade_crystal_netherite", + "turtle_egg", + "ecoarmor:upgrade_crystal_netherite", + "turtle_egg", + "ecoarmor:upgrade_crystal_cobalt", + "turtle_egg", + "ecoarmor:upgrade_crystal_netherite", + "turtle_egg", + "ecoarmor:upgrade_crystal_netherite" + ], + "giveAmount": 1, + "lore": [ + "&8Drop this onto an armor piece", + "&8to set its tier to:", + "&6&k!!&r &lEXOTIC&r &6&k!!&r", + "", + "&8&oRequires the armor to already have Netherite tier" + ] + }, + "properties": { + "helmet": { + "armor": 3, + "toughness": 2, + "knockbackResistance": 0, + "speedPercentage": 5, + "attackSpeedPercentage": 10, + "attackDamagePercentage": -5, + "attackKnockbackPercentage": -20 + }, + "chestplate": { + "armor": 8, + "toughness": 2, + "knockbackResistance": 0, + "speedPercentage": 5, + "attackSpeedPercentage": 10, + "attackDamagePercentage": -5, + "attackKnockbackPercentage": -20 + }, + "elytra": { + "armor": 3, + "toughness": 0, + "knockbackResistance": 0, + "speedPercentage": 5, + "attackSpeedPercentage": 10, + "attackDamagePercentage": -5, + "attackKnockbackPercentage": -20 + }, + "leggings": { + "armor": 6, + "toughness": 2, + "knockbackResistance": 0, + "speedPercentage": 5, + "attackSpeedPercentage": 10, + "attackDamagePercentage": -5, + "attackKnockbackPercentage": -20 + }, + "boots": { + "armor": 3, + "toughness": 2, + "knockbackResistance": 0, + "speedPercentage": 5, + "attackSpeedPercentage": 10, + "attackDamagePercentage": -5, + "attackKnockbackPercentage": -20 + } + } + } + ], + "sets": [ + { + "name": "ender", + "conditions": [], + "effects": [ + { + "id": "warp-chance", + "args": 20 + }, + { + "id": "evade-chance", + "args": 10 + } + ], + "advancedEffects": [ + { + "id": "warp-chance", + "args": 30 + }, + { + "id": "evade-chance", + "args": 20 + } + ], + "potionEffects": [ + ], + "advancedPotionEffects": [ + ], + "advancedLore": [ + "", + "&lADVANCED BONUS", + "&8» &330% Chance to warp behind your opponent", + "&8» &320% Chance to evade attacks", + "&8&oRequires full set to be worn" + ], + "advancementShardName": "Advancement Shard: &3Ender", + "advancementShardLore": [ + "&8Drop this onto &3Ender Armor", + "&8to make it Advanced." + ], + "shardCraftable": true, + "shardRecipe": [ + "prismarine_shard", + "ecoarmor:set_ender_helmet", + "prismarine_shard", + "ecoarmor:set_ender_chestplate", + "nether_star", + "ecoarmor:set_ender_leggings", + "prismarine_shard", + "ecoarmor:set_ender_boots", + "prismarine_shard" + ], + "helmet": { + "enchants": [ + { + "id": "protection", + "level": 3 + }, + { + "id": "unbreaking", + "level": 1 + } + ], + "material": "player_head", + "skullTexture": "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGFhOGZjOGRlNjQxN2I0OGQ0OGM4MGI0NDNjZjUzMjZlM2Q5ZGE0ZGJlOWIyNWZjZDQ5NTQ5ZDk2MTY4ZmMwIn19fQ==", + "name": "&bEnder Helmet", + "advancedName": "Advanced&3 Ender Helmet", + "effectiveDurability": 1024, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&3&lENDER SET BONUS", + "&8» &320% Chance to warp behind your opponent", + "&8» &310% Chance to evade attacks", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "ender_eye", + "ender_eye", + "ender_eye", + "ender_eye", + "iron_helmet", + "ender_eye", + "ender_eye", + "ender_eye", + "ender_eye" + ] + }, + "chestplate": { + "enchants": [ + { + "id": "protection", + "level": 3 + }, + { + "id": "unbreaking", + "level": 1 + } + ], + "material": "leather_chestplate", + "leatherColor": "#0d6961", + "name": "&3Ender Chestplate", + "advancedName": "Advanced&3 Ender Chestplate", + "effectiveDurability": 1024, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&3&lENDER SET BONUS", + "&8» &320% Chance to warp behind your opponent", + "&8» &310% Chance to evade attacks", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "diamond", + "recipe": [ + "ender_eye", + "ender_eye", + "ender_eye", + "ender_eye", + "iron_chestplate", + "ender_eye", + "ender_eye", + "ender_eye", + "ender_eye" + ] + }, + "elytra": { + "enchants": [ + { + "id": "unbreaking", + "level": 1 + } + ], + "material": "elytra", + "name": "&3Ender Elytra", + "advancedName": "Advanced&3 Ender Elytra", + "effectiveDurability": 1024, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&3&lENDER SET BONUS", + "&8» &320% Chance to warp behind your opponent", + "&8» &310% Chance to evade attacks", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "ender_eye", + "ender_eye", + "ender_eye", + "ender_eye", + "elytra", + "ender_eye", + "ender_eye", + "ender_eye", + "ender_eye" + ] + }, + "leggings": { + "enchants": [ + { + "id": "protection", + "level": 3 + }, + { + "id": "unbreaking", + "level": 1 + } + ], + "material": "leather_leggings", + "leatherColor": "#0d6961", + "name": "&3Ender Leggings", + "advancedName": "Advanced&3 Ender Leggings", + "effectiveDurability": 1024, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&3&lENDER SET BONUS", + "&8» &320% Chance to warp behind your opponent", + "&8» &310% Chance to evade attacks", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "ender_eye", + "ender_eye", + "ender_eye", + "ender_eye", + "iron_leggings", + "ender_eye", + "ender_eye", + "ender_eye", + "ender_eye" + ] + }, + "boots": { + "enchants": [ + { + "id": "protection", + "level": 3 + }, + { + "id": "unbreaking", + "level": 1 + } + ], + "material": "leather_boots", + "leatherColor": "#0d6961", + "name": "&3Ender Boots", + "advancedName": "Advanced&3 Ender Boots", + "effectiveDurability": 1024, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&3&lENDER SET BONUS", + "&8» &320% Chance to warp behind your opponent", + "&8» &310% Chance to evade attacks", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "ender_eye", + "ender_eye", + "ender_eye", + "ender_eye", + "iron_boots", + "ender_eye", + "ender_eye", + "ender_eye", + "ender_eye" + ] + } + }, + { + "name": "miner", + "conditions": [], + "effects": [ + { + "id": "experience-multiplier", + "args": 1.25 + } + ], + "advancedEffects": [ + { + "id": "hunger-loss-multiplier", + "args": 0.5 + } + ], + "potionEffects": [ + { + "id": "FAST_DIGGING", + "args": 2 + } + ], + "advancedPotionEffects": [ + { + "id": "FAST_DIGGING", + "args": 3 + } + ], + "advancedLore": [ + "", + "&lADVANCED BONUS", + "&8» &6Lose 50% less hunger", + "&8» &6Permanent Haste III", + "&8&oRequires full set to be worn" + ], + "advancementShardName": "Advancement Shard: &9Miner", + "advancementShardLore": [ + "&8Drop this onto &9Miner Armor", + "&8to make it Advanced." + ], + "shardCraftable": true, + "shardRecipe": [ + "prismarine_shard", + "ecoarmor:set_miner_helmet", + "prismarine_shard", + "ecoarmor:set_miner_chestplate", + "nether_star", + "ecoarmor:set_miner_leggings", + "prismarine_shard", + "ecoarmor:set_miner_boots", + "prismarine_shard" + ], + "helmet": { + "enchants": [ + { + "id": "fire_protection", + "level": 4 + }, + { + "id": "unbreaking", + "level": 1 + } + ], + "material": "leather_helmet", + "leatherColor": "#6699cc", + "name": "&9Miner Helmet", + "advancedName": "Advanced&9 Miner Helmet", + "effectiveDurability": 1024, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&9&lMINER SET BONUS", + "&8» &9Gain 50% more experience", + "&8» &9Permanent Haste II", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "diamond_pickaxe", + "air", + "diamond_pickaxe", + "diamond_helmet", + "diamond_pickaxe", + "air", + "diamond_pickaxe", + "air" + ] + }, + "chestplate": { + "enchants": [ + { + "id": "fire_protection", + "level": 4 + }, + { + "id": "unbreaking", + "level": 1 + } + ], + "material": "leather_chestplate", + "leatherColor": "#6699cc", + "name": "&9Miner Chestplate", + "advancedName": "Advanced&9 Miner Chestplate", + "effectiveDurability": 1024, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&9&lMINER SET BONUS", + "&8» &9Gain 50% more experience", + "&8» &9Permanent Haste II", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "diamond_pickaxe", + "air", + "diamond_pickaxe", + "diamond_chestplate", + "diamond_pickaxe", + "air", + "diamond_pickaxe", + "air" + ] + }, + "elytra": { + "enchants": [ + { + "id": "unbreaking", + "level": 1 + } + ], + "material": "elytra", + "name": "&9Miner Elytra", + "advancedName": "Advanced&9 Miner Elytra", + "effectiveDurability": 1024, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&9&lMINER SET BONUS", + "&8» &9Gain 50% more experience", + "&8» &9Permanent Haste II", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "diamond_pickaxe", + "air", + "diamond_pickaxe", + "elytra", + "diamond_pickaxe", + "air", + "diamond_pickaxe", + "air" + ] + }, + "leggings": { + "enchants": [ + { + "id": "fire_protection", + "level": 4 + }, + { + "id": "unbreaking", + "level": 1 + } + ], + "material": "leather_leggings", + "leatherColor": "#6699cc", + "name": "&9Miner Leggings", + "advancedName": "Advanced&9 Miner Leggings", + "effectiveDurability": 1024, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&9&lMINER SET BONUS", + "&8» &9Gain 50% more experience", + "&8» &9Permanent Haste II", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "diamond_pickaxe", + "air", + "diamond_pickaxe", + "diamond_leggings", + "diamond_pickaxe", + "air", + "diamond_pickaxe", + "air" + ] + }, + "boots": { + "enchants": [ + { + "id": "fire_protection", + "level": 4 + }, + { + "id": "unbreaking", + "level": 1 + } + ], + "material": "leather_boots", + "leatherColor": "#6699cc", + "name": "&9Miner Boots", + "advancedName": "Advanced&9 Miner Boots", + "effectiveDurability": 1024, + "unbreakable": false, + "flags": [], + "customModeldata": -1, + "lore": [ + "&9&lMINER SET BONUS", + "&8» &9Gain 50% more experience", + "&8» &9Permanent Haste II", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "diamond_pickaxe", + "air", + "diamond_pickaxe", + "diamond_boots", + "diamond_pickaxe", + "air", + "diamond_pickaxe", + "air" + ] + } + }, + { + "name": "reaper", + "conditions": [], + "effects": [ + { + "id": "damage-multiplier", + "args": 1.25 + } + ], + "advancedEffects": [ + { + "id": "damage-taken-multiplier", + "args": 0.9 + } + ], + "potionEffects": [ + ], + "advancedPotionEffects": [ + ], + "advancedLore": [ + "", + "&lADVANCED BONUS", + "&8» &6Take 10% less damage", + "&8&oRequires full set to be worn" + ], + "advancementShardName": "Advancement Shard: &cReaper", + "advancementShardLore": [ + "&8Drop this onto &cReaper Armor", + "&8to make it Advanced." + ], + "shardCraftable": true, + "shardRecipe": [ + "prismarine_shard", + "ecoarmor:set_reaper_helmet", + "prismarine_shard", + "ecoarmor:set_reaper_chestplate", + "nether_star", + "ecoarmor:set_reaper_leggings", + "prismarine_shard", + "ecoarmor:set_reaper_boots", + "prismarine_shard" + ], + "helmet": { + "enchants": [ + { + "id": "protection", + "level": 4 + }, + { + "id": "unbreaking", + "level": 3 + } + ], + "material": "leather_helmet", + "leatherColor": "#303030", + "name": "&cReaper Helmet", + "advancedName": "Advanced&c Reaper Helmet", + "effectiveDurability": 2048, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&c&lREAPER SET BONUS", + "&8» &cDeal 25% more damage", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "nether_star", + "air", + "nether_star", + "netherite_helmet", + "nether_star", + "air", + "nether_star", + "air" + ] + }, + "chestplate": { + "enchants": [ + { + "id": "protection", + "level": 4 + }, + { + "id": "unbreaking", + "level": 3 + } + ], + "material": "leather_chestplate", + "leatherColor": "#303030", + "name": "&cReaper Chestplate", + "advancedName": "Advanced&c Reaper Chestplate", + "effectiveDurability": 2048, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&c&lREAPER SET BONUS", + "&8» &cDeal 25% more damage", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "nether_star", + "air", + "nether_star", + "netherite_chestplate", + "nether_star", + "air", + "nether_star", + "air" + ] + }, + "elytra": { + "enchants": [ + { + "id": "unbreaking", + "level": 3 + } + ], + "material": "elytra", + "name": "&cReaper Elytra", + "advancedName": "Advanced&c Reaper Elytra", + "effectiveDurability": 2048, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&c&lREAPER SET BONUS", + "&8» &cDeal 25% more damage", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "nether_star", + "air", + "nether_star", + "elytra", + "nether_star", + "air", + "nether_star", + "air" + ] + }, + "leggings": { + "enchants": [ + { + "id": "protection", + "level": 4 + }, + { + "id": "unbreaking", + "level": 3 + } + ], + "material": "leather_leggings", + "leatherColor": "#303030", + "name": "&cReaper Leggings", + "advancedName": "Advanced&c Reaper Leggings", + "effectiveDurability": 2048, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&c&lREAPER SET BONUS", + "&8» &cDeal 25% more damage", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "nether_star", + "air", + "nether_star", + "netherite_leggings", + "nether_star", + "air", + "nether_star", + "air" + ] + }, + "boots": { + "enchants": [ + { + "id": "protection", + "level": 4 + }, + { + "id": "unbreaking", + "level": 3 + } + ], + "material": "leather_boots", + "leatherColor": "#303030", + "name": "&cReaper Boots", + "advancedName": "Advanced&c Reaper Boots", + "effectiveDurability": 2048, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&c&lREAPER SET BONUS", + "&8» &cDeal 25% more damage", + "&8&oRequires full set to be worn", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "nether_star", + "air", + "nether_star", + "netherite_boots", + "nether_star", + "air", + "nether_star", + "air" + ] + } + }, + { + "name": "young", + "conditions": [ + { + "id": "above-health-percent", + "args": 50 + } + ], + "effects": [ + { + "id": "speed-multiplier", + "args": 1.25 + } + ], + "advancedEffects": [ + { + "id": "speed-multiplier", + "args": 1.5 + } + ], + "potionEffects": [ + ], + "advancedPotionEffects": [ + { + "id": "jump", + "args": 2 + } + ], + "advancedLore": [ + "", + "&lADVANCED BONUS", + "&8» &bPermanent Jump Boost II", + "&8» &bMove 50% faster", + "&8&oRequires full set to be worn above 50% health" + ], + "advancementShardName": "Advancement Shard: &bYoung", + "advancementShardLore": [ + "&8Drop this onto &bYoung Armor", + "&8to make it Advanced." + ], + "shardCraftable": true, + "shardRecipe": [ + "prismarine_shard", + "ecoarmor:set_young_helmet", + "prismarine_shard", + "ecoarmor:set_young_chestplate", + "nether_star", + "ecoarmor:set_young_leggings", + "prismarine_shard", + "ecoarmor:set_young_boots", + "prismarine_shard" + ], + "helmet": { + "enchants": [ + { + "id": "protection", + "level": 2 + }, + { + "id": "protection", + "level": 3 + } + ], + "material": "player_head", + "skullTexture": "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWM0ODZhZjNiODgyNzY2ZTgyYTBiYzE2NjVmZjAyZWI2ZTg3M2I2ZTBkNzcxZjNhZGFiYzc1OWI3MjAyMjZhIn19fQ==", + "name": "&bYoung Helmet", + "advancedName": "Advanced&b Young Helmet", + "effectiveDurability": 768, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&b&lYOUNG SET BONUS", + "&8» &bMove 25% faster", + "&8&oRequires full set to be worn above 50% health", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "diamond", + "redstone", + "diamond", + "redstone", + "air", + "redstone", + "air", + "air", + "air" + ] + }, + "chestplate": { + "enchants": [ + { + "id": "protection", + "level": 2 + }, + { + "id": "protection", + "level": 3 + } + ], + "material": "leather_chestplate", + "leatherColor": "#DDE4F0", + "name": "&bYoung Chestplate", + "advancedName": "Advanced&b Young Chestplate", + "effectiveDurability": 768, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&b&lYOUNG SET BONUS", + "&8» &bMove 25% faster", + "&8&oRequires full set to be worn above 50% health", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "diamond", + "air", + "diamond", + "redstone", + "diamond", + "redstone", + "diamond", + "redstone", + "diamond" + ] + }, + "elytra": { + "enchants": [ + { + "id": "protection", + "level": 3 + } + ], + "material": "elytra", + "name": "&bYoung Elytra", + "advancedName": "Advanced&b Young Elytra", + "effectiveDurability": 768, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&b&lYOUNG SET BONUS", + "&8» &bMove 25% faster", + "&8&oRequires full set to be worn above 50% health", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "redstone", + "air", + "redstone", + "elytra", + "redstone", + "air", + "redstone", + "air" + ] + }, + "leggings": { + "enchants": [ + { + "id": "protection", + "level": 2 + }, + { + "id": "protection", + "level": 3 + } + ], + "material": "leather_leggings", + "leatherColor": "#DDE4F0", + "name": "&bYoung Leggings", + "advancedName": "Advanced&b Young Leggings", + "effectiveDurability": 768, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&b&lYOUNG SET BONUS", + "&8» &bMove 25% faster", + "&8&oRequires full set to be worn above 50% health", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "diamond", + "redstone", + "diamond", + "redstone", + "air", + "redstone", + "diamond", + "air", + "diamond" + ] + }, + "boots": { + "enchants": [ + { + "id": "protection", + "level": 2 + }, + { + "id": "protection", + "level": 3 + }, + { + "id": "depth_strider", + "level": 3 + } + ], + "material": "leather_boots", + "leatherColor": "#DDE4F0", + "name": "&bYoung Boots", + "advancedName": "Advanced&b Young Boots", + "effectiveDurability": 768, + "unbreakable": false, + "flags": [], + "customModelData": -1, + "lore": [ + "&b&lYOUNG SET BONUS", + "&8» &bMove 25% faster", + "&8&oRequires full set to be worn above 50% health", + "", + "&fTier: %tier%", + "&8&oUpgrade with an Upgrade Crystal" + ], + "craftable": true, + "defaultTier": "default", + "recipe": [ + "air", + "air", + "air", + "diamond", + "air", + "diamond", + "redstone", + "air", + "redstone" + ] + } + } + ] +} \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/lang.yml b/eco-core/core-plugin/src/main/resources/lang.yml index c29d2d4..8fe7ce4 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -7,4 +7,5 @@ messages: invalid-player: "&cInvalid player!" needs-item: "&cYou must specify an item!" invalid-item: "&cInvalid item!" - give-success: "Gave &a%item%&r to &a%recipient%" \ No newline at end of file + give-success: "Gave &a%item%&r to &a%recipient%" + open-editor: "Open the editor here: &a%url%" \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/plugin.yml b/eco-core/core-plugin/src/main/resources/plugin.yml index 3709680..a3f2589 100644 --- a/eco-core/core-plugin/src/main/resources/plugin.yml +++ b/eco-core/core-plugin/src/main/resources/plugin.yml @@ -29,6 +29,9 @@ commands: eagive: description: Give a player a set permission: ecoarmor.give + eaeditor: + description: Open the editor + permission: ecoarmor.editor permissions: ecoarmor.*: @@ -38,6 +41,7 @@ permissions: ecoarmor.reload: true ecoarmor.give: true ecoarmor.noflydisable: true + ecoarmor.editor: true ecoarmor.reload: description: Allows reloading the config @@ -48,3 +52,6 @@ permissions: ecoarmor.noflydisable: description: Prevents losing fly. default: op + ecoarmor.editor: + description: Allows the user of /eaeditor. + default: op diff --git a/eco-core/core-plugin/src/main/resources/sets/ender.yml b/eco-core/core-plugin/src/main/resources/sets/ender.yml deleted file mode 100644 index 3051fde..0000000 --- a/eco-core/core-plugin/src/main/resources/sets/ender.yml +++ /dev/null @@ -1,199 +0,0 @@ -enabled: true -conditions: [] -set-bonus: - - "warp-chance: 20" - - "evade-chance: 10" -advanced-set-bonus: - - "warp-chance: 30" - - "evade-chance: 20" -advanced-lore: - - "" - - "&lADVANCED BONUS" - - "&8» &330% Chance to warp behind your opponent" - - "&8» &320% Chance to evade attacks" - - "&8&oRequires full set to be worn" -advancement-shard-name: "Advancement Shard: &3Ender" -advancement-shard-lore: - - "&8Drop this onto &3Ender Armor" - - "&8to make it Advanced." -shard-craftable: true -shard-recipe: - - prismarine_shard - - ecoarmor:set_ender_helmet - - prismarine_shard - - - ecoarmor:set_ender_chestplate - - nether_star - - ecoarmor:set_ender_leggings - - - prismarine_shard - - ecoarmor:set_ender_boots - - prismarine_shard -helmet: - enchants: - - "protection: 3" - - "unbreaking: 1" - material: player_head - skull-texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGFhOGZjOGRlNjQxN2I0OGQ0OGM4MGI0NDNjZjUzMjZlM2Q5ZGE0ZGJlOWIyNWZjZDQ5NTQ5ZDk2MTY4ZmMwIn19fQ== - name: "&bEnder Helmet" - advanced-name: "Advanced&3 Ender Helmet" - effective-durability: 1024 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&3&lENDER SET BONUS" - - "&8» &320% Chance to warp behind your opponent" - - "&8» &310% Chance to evade attacks" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - ender_eye - - ender_eye - - ender_eye - - - ender_eye - - iron_helmet - - ender_eye - - - ender_eye - - ender_eye - - ender_eye -chestplate: - enchants: - - "protection: 3" - - "unbreaking: 1" - material: leather_chestplate - leather-color: "#0d6961" - name: "&3Ender Chestplate" - advanced-name: "Advanced&3 Ender Chestplate" - effective-durability: 1024 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&3&lENDER SET BONUS" - - "&8» &320% Chance to warp behind your opponent" - - "&8» &310% Chance to evade attacks" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - ender_eye - - ender_eye - - ender_eye - - - ender_eye - - iron_chestplate - - ender_eye - - - ender_eye - - ender_eye - - ender_eye -elytra: - enchants: - - "unbreaking: 1" - material: elytra - name: "&3Ender Elytra" - advanced-name: "Advanced&3 Ender Elytra" - effective-durability: 1024 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&3&lENDER SET BONUS" - - "&8» &320% Chance to warp behind your opponent" - - "&8» &310% Chance to evade attacks" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - ender_eye - - ender_eye - - ender_eye - - - ender_eye - - elytra - - ender_eye - - - ender_eye - - ender_eye - - ender_eye -leggings: - enchants: - - "protection: 3" - - "unbreaking: 1" - material: leather_leggings - leather-color: "#0d6961" - name: "&3Ender Leggings" - advanced-name: "Advanced&3 Ender Leggings" - effective-durability: 1024 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&3&lENDER SET BONUS" - - "&8» &320% Chance to warp behind your opponent" - - "&8» &310% Chance to evade attacks" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - ender_eye - - ender_eye - - ender_eye - - - ender_eye - - iron_leggings - - ender_eye - - - ender_eye - - ender_eye - - ender_eye -boots: - enchants: - - "protection: 3" - - "unbreaking: 1" - material: leather_boots - leather-color: "#0d6961" - name: "&3Ender Boots" - advanced-name: "Advanced&3 Ender Boots" - effective-durability: 1024 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&3&lENDER SET BONUS" - - "&8» &320% Chance to warp behind your opponent" - - "&8» &310% Chance to evade attacks" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - ender_eye - - ender_eye - - ender_eye - - - ender_eye - - iron_boots - - ender_eye - - - ender_eye - - ender_eye - - ender_eye \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/sets/miner.yml b/eco-core/core-plugin/src/main/resources/sets/miner.yml deleted file mode 100644 index 644f6c0..0000000 --- a/eco-core/core-plugin/src/main/resources/sets/miner.yml +++ /dev/null @@ -1,201 +0,0 @@ -enabled: true -conditions: [] -set-bonus: - - "experience-multiplier: 1.25" -advanced-set-bonus: - - "hunger-loss-multiplier: 0.5" -potion-effects: - - "fast_digging: 2" -advanced-potion-effects: - - "fast_digging: 3" -advanced-lore: - - "" - - "&lADVANCED BONUS" - - "&8» &6Lose 50% less hunger" - - "&8» &6Permanent Haste III" - - "&8&oRequires full set to be worn" -advancement-shard-name: "Advancement Shard: &9Miner" -advancement-shard-lore: - - "&8Drop this onto &9Miner Armor" - - "&8to make it Advanced." -shard-craftable: true -shard-recipe: - - prismarine_shard - - ecoarmor:set_miner_helmet - - prismarine_shard - - - ecoarmor:set_miner_chestplate - - nether_star - - ecoarmor:set_miner_leggings - - - prismarine_shard - - ecoarmor:set_miner_boots - - prismarine_shard -helmet: - enchants: - - "fire_protection: 4" - - "unbreaking: 1" - material: leather_helmet - leather-color: "#6699cc" - name: "&9Miner Helmet" - advanced-name: "Advanced&9 Miner Helmet" - effective-durability: 1024 - unbreakable: false - flags: [] - custom-model-data: -1 - lore: - - "&9&lMINER SET BONUS" - - "&8» &9Gain 50% more experience" - - "&8» &9Permanent Haste II" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - diamond_pickaxe - - air - - - diamond_pickaxe - - diamond_helmet - - diamond_pickaxe - - - air - - diamond_pickaxe - - air -chestplate: - enchants: - - "fire_protection: 4" - - "unbreaking: 1" - material: leather_chestplate - leather-color: "#6699cc" - name: "&9Miner Chestplate" - advanced-name: "Advanced&9 Miner Chestplate" - effective-durability: 1024 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&9&lMINER SET BONUS" - - "&8» &9Gain 50% more experience" - - "&8» &9Permanent Haste II" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - diamond_pickaxe - - air - - - diamond_pickaxe - - diamond_chestplate - - diamond_pickaxe - - - air - - diamond_pickaxe - - air -elytra: - enchants: - - "unbreaking: 1" - material: elytra - name: "&9Miner Elytra" - advanced-name: "Advanced&9 Miner Elytra" - effective-durability: 1024 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&9&lMINER SET BONUS" - - "&8» &9Gain 50% more experience" - - "&8» &9Permanent Haste II" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - diamond_pickaxe - - air - - - diamond_pickaxe - - elytra - - diamond_pickaxe - - - air - - diamond_pickaxe - - air -leggings: - enchants: - - "fire_protection: 4" - - "unbreaking: 1" - material: leather_leggings - leather-color: "#6699cc" - name: "&9Miner Leggings" - advanced-name: "Advanced&9 Miner Leggings" - effective-durability: 1024 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&9&lMINER SET BONUS" - - "&8» &9Gain 50% more experience" - - "&8» &9Permanent Haste II" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - diamond_pickaxe - - air - - - diamond_pickaxe - - diamond_leggings - - diamond_pickaxe - - - air - - diamond_pickaxe - - air -boots: - enchants: - - "fire_protection: 4" - - "unbreaking: 1" - material: leather_boots - leather-color: "#6699cc" - name: "&9Miner Boots" - advanced-name: "Advanced&9 Miner Boots" - effective-durability: 1024 - unbreakable: false - flags: [] - custom-model-data: -1 - lore: - - "&9&lMINER SET BONUS" - - "&8» &9Gain 50% more experience" - - "&8» &9Permanent Haste II" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - diamond_pickaxe - - air - - - diamond_pickaxe - - diamond_boots - - diamond_pickaxe - - - air - - diamond_pickaxe - - air \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/sets/reaper.yml b/eco-core/core-plugin/src/main/resources/sets/reaper.yml deleted file mode 100644 index 4e634b4..0000000 --- a/eco-core/core-plugin/src/main/resources/sets/reaper.yml +++ /dev/null @@ -1,191 +0,0 @@ -enabled: true -conditions: [] -set-bonus: - - "damage-multiplier: 1.25" -advanced-set-bonus: - - "damage-taken-multiplier: 0.9" -advanced-lore: - - "" - - "&lADVANCED BONUS" - - "&8» &6Take 10% less damage" - - "&8&oRequires full set to be worn" -advancement-shard-name: "Advancement Shard: &cReaper" -advancement-shard-lore: - - "&8Drop this onto &cReaper Armor" - - "&8to make it Advanced." -shard-craftable: true -shard-recipe: - - prismarine_shard - - ecoarmor:set_reaper_helmet - - prismarine_shard - - - ecoarmor:set_reaper_chestplate - - nether_star - - ecoarmor:set_reaper_leggings - - - prismarine_shard - - ecoarmor:set_reaper_boots - - prismarine_shard -helmet: - enchants: - - "protection: 4" - - "unbreaking: 3" - material: leather_helmet - leather-color: "#303030" - name: "&cReaper Helmet" - advanced-name: "Advanced&c Reaper Helmet" - effective-durability: 2048 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&c&lREAPER SET BONUS" - - "&8» &cDeal 25% more damage" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - nether_star - - air - - - nether_star - - netherite_helmet - - nether_star - - - air - - nether_star - - air -chestplate: - enchants: - - "protection: 4" - - "unbreaking: 3" - material: leather_chestplate - leather-color: "#303030" - name: "&cReaper Chestplate" - advanced-name: "Advanced&c Reaper Chestplate" - effective-durability: 2048 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&c&lREAPER SET BONUS" - - "&8» &cDeal 25% more damage" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - nether_star - - air - - - nether_star - - netherite_chestplate - - nether_star - - - air - - nether_star - - air -elytra: - enchants: - - "unbreaking: 3" - material: elytra - name: "&cReaper Elytra" - advanced-name: "Advanced&c Reaper Elytra" - effective-durability: 2048 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&c&lREAPER SET BONUS" - - "&8» &cDeal 25% more damage" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - nether_star - - air - - - nether_star - - elytra - - nether_star - - - air - - nether_star - - air -leggings: - enchants: - - "protection: 4" - - "unbreaking: 3" - material: leather_leggings - leather-color: "#303030" - name: "&cReaper Leggings" - advanced-name: "Advanced&c Reaper Leggings" - effective-durability: 2048 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&c&lREAPER SET BONUS" - - "&8» &cDeal 25% more damage" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - nether_star - - air - - - nether_star - - netherite_leggings - - nether_star - - - air - - nether_star - - air -boots: - enchants: - - "protection: 4" - - "unbreaking: 3" - material: leather_boots - leather-color: "#303030" - name: "&cReaper Boots" - advanced-name: "Advanced&c Reaper Boots" - effective-durability: 2048 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&c&lREAPER SET BONUS" - - "&8» &cDeal 25% more damage" - - "&8&oRequires full set to be worn" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - nether_star - - air - - - nether_star - - netherite_boots - - nether_star - - - air - - nether_star - - air \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/sets/young.yml b/eco-core/core-plugin/src/main/resources/sets/young.yml deleted file mode 100644 index 0287c71..0000000 --- a/eco-core/core-plugin/src/main/resources/sets/young.yml +++ /dev/null @@ -1,196 +0,0 @@ -enabled: true -conditions: - - "above-health-percent: 50" -set-bonus: - - "speed-multiplier: 1.25" -advanced-set-bonus: - - "speed-multiplier: 1.5" -advanced-potion-effects: - - "jump: 2" -advanced-lore: - - "" - - "&lADVANCED BONUS" - - "&8» &bPermanent Jump Boost II" - - "&8» &bMove 50% faster" - - "&8&oRequires full set to be worn above 50% health" -advancement-shard-name: "Advancement Shard: &bYoung" -advancement-shard-lore: - - "&8Drop this onto &bYoung Armor" - - "&8to make it Advanced." -shard-craftable: true -shard-recipe: - - prismarine_shard - - ecoarmor:set_young_helmet - - prismarine_shard - - - ecoarmor:set_young_chestplate - - nether_star - - ecoarmor:set_young_leggings - - - prismarine_shard - - ecoarmor:set_young_boots - - prismarine_shard -helmet: - enchants: - - "protection: 2" - - "unbreaking: 3" - material: player_head - skull-texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWM0ODZhZjNiODgyNzY2ZTgyYTBiYzE2NjVmZjAyZWI2ZTg3M2I2ZTBkNzcxZjNhZGFiYzc1OWI3MjAyMjZhIn19fQ== - name: "&bYoung Helmet" - advanced-name: "Advanced&b Young Helmet" - effective-durability: 768 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&b&lYOUNG SET BONUS" - - "&8» &bMove 25% faster" - - "&8&oRequires full set to be worn above 50% health" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - diamond - - redstone - - diamond - - - redstone - - air - - redstone - - - air - - air - - air -chestplate: - enchants: - - "protection: 2" - - "unbreaking: 3" - material: leather_chestplate - leather-color: "#DDE4F0" - name: "&bYoung Chestplate" - advanced-name: "Advanced&b Young Chestplate" - effective-durability: 768 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&b&lYOUNG SET BONUS" - - "&8» &bMove 25% faster" - - "&8&oRequires full set to be worn above 50% health" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - diamond - - air - - diamond - - - redstone - - diamond - - redstone - - - diamond - - redstone - - diamond -elytra: - enchants: - - "unbreaking: 3" - material: elytra - name: "&bYoung Elytra" - advanced-name: "Advanced&b Young Elytra" - effective-durability: 768 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&b&lYOUNG SET BONUS" - - "&8» &bMove 25% faster" - - "&8&oRequires full set to be worn above 50% health" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - redstone - - air - - - redstone - - elytra - - redstone - - - air - - redstone - - air -leggings: - enchants: - - "protection: 2" - - "unbreaking: 3" - material: leather_leggings - leather-color: "#DDE4F0" - name: "&bYoung Leggings" - advanced-name: "Advanced&b Young Leggings" - effective-durability: 768 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&b&lYOUNG SET BONUS" - - "&8» &bMove 25% faster" - - "&8&oRequires full set to be worn above 50% health" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - diamond - - redstone - - diamond - - - redstone - - air - - redstone - - - diamond - - air - - diamond -boots: - enchants: - - "protection: 2" - - "unbreaking: 3" - - "depth_strider: 3" - material: leather_boots - leather-color: "#DDE4F0" - name: "&bYoung Boots" - advanced-name: "Advanced&b Young Boots" - effective-durability: 768 - unbreakable: false - flags: [ ] - custom-model-data: -1 - lore: - - "&b&lYOUNG SET BONUS" - - "&8» &bMove 25% faster" - - "&8&oRequires full set to be worn above 50% health" - - "" - - "&fTier: %tier%" - - "&8&oUpgrade with an Upgrade Crystal" - craftable: true - default-tier: default - recipe: - - air - - air - - air - - - diamond - - air - - diamond - - - redstone - - air - - redstone diff --git a/eco-core/core-plugin/src/main/resources/tiers/cobalt.yml b/eco-core/core-plugin/src/main/resources/tiers/cobalt.yml deleted file mode 100644 index 9d82028..0000000 --- a/eco-core/core-plugin/src/main/resources/tiers/cobalt.yml +++ /dev/null @@ -1,66 +0,0 @@ -enabled: true -display: "/ab&lCOBALT" -requires-tiers: # Leave empty to always allow application - - iron -crystal-craftable: true -crystal-name: "/abCobalt Upgrade Crystal" -crystal-recipe: - - air - - obsidian - - air - - - obsidian - - ecoarmor:upgrade_crystal_iron - - obsidian - - - air - - obsidian - - air -recipe-give-amount: 1 -crystal-lore: - - "&8Drop this onto an armor piece" - - "&8to set its tier to:" - - "/ab&lCOBALT" - - "" - - "&8&oRequires the armor to already have Iron tier" -properties: - helmet: - armor: 3 - toughness: 4 - knockback-resistance: 1 - speed-percentage: -10 - attack-speed-percentage: -10 - attack-damage-percentage: 0 - attack-knockback-percentage: 10 - chestplate: - armor: 8 - toughness: 4 - knockback-resistance: 1 - speed-percentage: -10 - attack-speed-percentage: -10 - attack-damage-percentage: 0 - attack-knockback-percentage: 10 - elytra: - armor: 6 - toughness: 2 - knockback-resistance: 1 - speed-percentage: -10 - attack-speed-percentage: -10 - attack-damage-percentage: 0 - attack-knockback-percentage: 10 - leggings: - armor: 6 - toughness: 4 - knockback-resistance: 1 - speed-percentage: -10 - attack-speed-percentage: -1 - attack-damage-percentage: 0 - attack-knockback-percentage: 10 - boots: - armor: 3 - toughness: 4 - knockback-resistance: 1 - speed-percentage: -10 - attack-speed-percentage: -10 - attack-damage-percentage: 0 - attack-knockback-percentage: 10 \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/tiers/default.yml b/eco-core/core-plugin/src/main/resources/tiers/default.yml deleted file mode 100644 index 6645637..0000000 --- a/eco-core/core-plugin/src/main/resources/tiers/default.yml +++ /dev/null @@ -1,62 +0,0 @@ -display: "&8&lDEFAULT" -requires-tiers: [] # Leave empty to always allow application -crystal-craftable: false -crystal-name: "&8Default Upgrade Crystal" -crystal-recipe: - - air - - leather - - air - - - leather - - leather_chestplate - - leather - - - air - - leather - - air -recipe-give-amount: 1 -crystal-lore: - - "&8Drop this onto an armor piece" - - "&8to set its tier to:" - - "&8&lDEFAULT" -properties: - helmet: - armor: 1 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - chestplate: - armor: 3 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - elytra: - armor: 0 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - leggings: - armor: 2 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - boots: - armor: 1 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/tiers/diamond.yml b/eco-core/core-plugin/src/main/resources/tiers/diamond.yml deleted file mode 100644 index aaf7933..0000000 --- a/eco-core/core-plugin/src/main/resources/tiers/diamond.yml +++ /dev/null @@ -1,66 +0,0 @@ -enabled: true -display: "&b&lDIAMOND" -requires-tiers: # Leave empty to always allow application - - iron -crystal-craftable: true -crystal-name: "&bDiamond Upgrade Crystal" -crystal-recipe: - - air - - diamond_block - - air - - - diamond_block - - ecoarmor:upgrade_crystal_iron - - diamond_block - - - air - - diamond_block - - air -recipe-give-amount: 1 -crystal-lore: - - "&8Drop this onto an armor piece" - - "&8to set its tier to:" - - "&b&lDIAMOND" - - "" - - "&8&oRequires the armor to already have Iron tier" -properties: - helmet: - armor: 3 - toughness: 2 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - chestplate: - armor: 8 - toughness: 2 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - elytra: - armor: 3 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - leggings: - armor: 6 - toughness: 2 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - boots: - armor: 3 - toughness: 2 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/tiers/exotic.yml b/eco-core/core-plugin/src/main/resources/tiers/exotic.yml deleted file mode 100644 index e315000..0000000 --- a/eco-core/core-plugin/src/main/resources/tiers/exotic.yml +++ /dev/null @@ -1,66 +0,0 @@ -enabled: true -display: "&6&k!!&r &lEXOTIC&r &6&k!!&r" -requires-tiers: # Leave empty to always allow application - - netherite -crystal-craftable: true -crystal-name: "Exotic Upgrade Crystal" -crystal-recipe: - - ecoarmor:upgrade_crystal_netherite - - turtle_egg - - ecoarmor:upgrade_crystal_netherite - - - turtle_egg - - ecoarmor:upgrade_crystal_cobalt - - turtle_egg - - - ecoarmor:upgrade_crystal_netherite - - turtle_egg - - ecoarmor:upgrade_crystal_netherite -recipe-give-amount: 1 -crystal-lore: - - "&8Drop this onto an armor piece" - - "&8to set its tier to:" - - "&6&k!!&r &lEXOTIC&r &6&k!!&r" - - "" - - "&8&oRequires the armor to already have Netherite tier" -properties: - helmet: - armor: 3 - toughness: 2 - knockback-resistance: 0 - speed-percentage: 5 - attack-speed-percentage: 10 - attack-damage-percentage: -5 - attack-knockback-percentage: -20 - chestplate: - armor: 8 - toughness: 2 - knockback-resistance: 0 - speed-percentage: 5 - attack-speed-percentage: 10 - attack-damage-percentage: -5 - attack-knockback-percentage: -20 - elytra: - armor: 3 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 5 - attack-speed-percentage: 10 - attack-damage-percentage: -5 - attack-knockback-percentage: -20 - leggings: - armor: 6 - toughness: 2 - knockback-resistance: 0 - speed-percentage: 5 - attack-speed-percentage: 10 - attack-damage-percentage: -5 - attack-knockback-percentage: -20 - boots: - armor: 3 - toughness: 2 - knockback-resistance: 0 - speed-percentage: 5 - attack-speed-percentage: 10 - attack-damage-percentage: -5 - attack-knockback-percentage: -20 \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/tiers/iron.yml b/eco-core/core-plugin/src/main/resources/tiers/iron.yml deleted file mode 100644 index 36fc5a2..0000000 --- a/eco-core/core-plugin/src/main/resources/tiers/iron.yml +++ /dev/null @@ -1,66 +0,0 @@ -enabled: true -display: "&7&lIRON" -requires-tiers: # Leave empty to always allow application - - default -crystal-craftable: true -crystal-name: "&7Iron Upgrade Crystal" -crystal-recipe: - - air - - iron_block - - air - - - iron_block - - leather_chestplate - - iron_block - - - air - - iron_block - - air -recipe-give-amount: 1 -crystal-lore: - - "&8Drop this onto an armor piece" - - "&8to set its tier to:" - - "&7&lIRON" - - "" - - "&8&oRequires the armor to already have default tier" -properties: - helmet: - armor: 2 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - chestplate: - armor: 6 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - elytra: - armor: 2 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - leggings: - armor: 5 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - boots: - armor: 2 - toughness: 0 - knockback-resistance: 0 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/tiers/manyullyn.yml b/eco-core/core-plugin/src/main/resources/tiers/manyullyn.yml deleted file mode 100644 index 0276abe..0000000 --- a/eco-core/core-plugin/src/main/resources/tiers/manyullyn.yml +++ /dev/null @@ -1,66 +0,0 @@ -enabled: true -display: "&d&k!!&r &lMANYULLYN&r &d&k!!&r" -requires-tiers: # Leave empty to always allow application - - netherite -crystal-craftable: true -crystal-name: "Manyullyn Upgrade Crystal" -crystal-recipe: - - ecoarmor:upgrade_crystal_netherite - - enchanted_golden_apple - - ecoarmor:upgrade_crystal_netherite - - - enchanted_golden_apple - - ecoarmor:upgrade_crystal_netherite - - enchanted_golden_apple - - - ecoarmor:upgrade_crystal_netherite - - enchanted_golden_apple - - ecoarmor:upgrade_crystal_netherite -recipe-give-amount: 1 -crystal-lore: - - "&8Drop this onto an armor piece" - - "&8to set its tier to:" - - "&d&k!!&r &lMANYULLYN&r &d&k!!&r" - - "" - - "&8&oRequires the armor to already have Netherite tier" -properties: - helmet: - armor: 3 - toughness: 5 - knockback-resistance: 2 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - chestplate: - armor: 8 - toughness: 5 - knockback-resistance: 2 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - elytra: - armor: 3 - toughness: 0 - knockback-resistance: 2 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - leggings: - armor: 6 - toughness: 5 - knockback-resistance: 2 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - boots: - armor: 3 - toughness: 5 - knockback-resistance: 2 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/tiers/netherite.yml b/eco-core/core-plugin/src/main/resources/tiers/netherite.yml deleted file mode 100644 index 8782729..0000000 --- a/eco-core/core-plugin/src/main/resources/tiers/netherite.yml +++ /dev/null @@ -1,66 +0,0 @@ -enabled: true -display: "&c&lNETHERITE" -requires-tiers: # Leave empty to always allow application - - diamond -crystal-craftable: true -crystal-name: "&cNetherite Upgrade Crystal" -crystal-recipe: - - air - - netherite_ingot - - air - - - netherite_ingot - - ecoarmor:upgrade_crystal_diamond - - netherite_ingot - - - air - - netherite_ingot - - air -recipe-give-amount: 1 -crystal-lore: - - "&8Drop this onto an armor piece" - - "&8to set its tier to:" - - "&c&lNETHERITE" - - "" - - "&8&oRequires the armor to already have Diamond tier" -properties: - helmet: - armor: 3 - toughness: 3 - knockback-resistance: 1 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - chestplate: - armor: 8 - toughness: 3 - knockback-resistance: 1 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - elytra: - armor: 3 - toughness: 0 - knockback-resistance: 1 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - leggings: - armor: 6 - toughness: 3 - knockback-resistance: 1 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 - boots: - armor: 3 - toughness: 3 - knockback-resistance: 1 - speed-percentage: 0 - attack-speed-percentage: 0 - attack-damage-percentage: 0 - attack-knockback-percentage: 0 \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/tiers/osmium.yml b/eco-core/core-plugin/src/main/resources/tiers/osmium.yml deleted file mode 100644 index 10b0a6c..0000000 --- a/eco-core/core-plugin/src/main/resources/tiers/osmium.yml +++ /dev/null @@ -1,66 +0,0 @@ -enabled: true -display: "&b&k!!&r &lOSMIUM&r &b&k!!" -requires-tiers: # Leave empty to always allow application - - cobalt -crystal-craftable: true -crystal-name: "Osmium upgrade crystal" -crystal-recipe: - - air - - netherite_block - - air - - - netherite_block - - ecoarmor:upgrade_crystal_cobalt - - netherite_block - - - air - - netherite_block - - air -recipe-give-amount: 1 -crystal-lore: - - "&8Drop this onto an armor piece" - - "&8to set its tier to:" - - "&b&k!!&r &lOSMIUM&r &b&k!!" - - "" - - "&8&oRequires the armor to already have Cobalt tier" -properties: - helmet: - armor: 3 - toughness: 6 - knockback-resistance: 3 - speed-percentage: -15 - attack-speed-percentage: -15 - attack-damage-percentage: 5 - attack-knockback-percentage: 25 - chestplate: - armor: 8 - toughness: 6 - knockback-resistance: 3 - speed-percentage: -15 - attack-speed-percentage: -15 - attack-damage-percentage: 5 - attack-knockback-percentage: 25 - elytra: - armor: 8 - toughness: 6 - knockback-resistance: 3 - speed-percentage: -15 - attack-speed-percentage: -15 - attack-damage-percentage: 5 - attack-knockback-percentage: 25 - leggings: - armor: 6 - toughness: 6 - knockback-resistance: 3 - speed-percentage: -15 - attack-speed-percentage: -15 - attack-damage-percentage: 5 - attack-knockback-percentage: 25 - boots: - armor: 3 - toughness: 6 - knockback-resistance: 3 - speed-percentage: -15 - attack-speed-percentage: -15 - attack-damage-percentage: 5 - attack-knockback-percentage: 25 \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index d86eaf0..40ad033 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 4.3.5 +version = 5.0.0-pre1 plugin-name = EcoArmor \ No newline at end of file