From 9e8880c986628ab136d86e2ae8f611f8ab2bbc64 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Fri, 18 Jun 2021 08:51:13 +0100 Subject: [PATCH] Added /eaeditor and combined sets.json and tiers.json into ecoarmor.json --- .../com/willfp/ecoarmor/EcoArmorPlugin.java | 18 +- .../ecoarmor/commands/CommandEaeditor.java | 30 + .../{TiersJson.java => EcoArmorJson.java} | 6 +- .../com/willfp/ecoarmor/config/SetsJson.java | 16 - .../com/willfp/ecoarmor/sets/ArmorSets.java | 2 +- .../com/willfp/ecoarmor/upgrades/Tiers.java | 2 +- .../resources/{sets.json => ecoarmor.json} | 599 +++++++++++++++++ .../core-plugin/src/main/resources/lang.yml | 3 +- .../core-plugin/src/main/resources/plugin.yml | 7 + .../core-plugin/src/main/resources/tiers.json | 601 ------------------ 10 files changed, 649 insertions(+), 635 deletions(-) create mode 100644 eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEaeditor.java rename eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/{TiersJson.java => EcoArmorJson.java} (64%) delete mode 100644 eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/SetsJson.java rename eco-core/core-plugin/src/main/resources/{sets.json => ecoarmor.json} (61%) delete mode 100644 eco-core/core-plugin/src/main/resources/tiers.json 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 d6189cb..a3893b7 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,12 +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.SetsJson; -import com.willfp.ecoarmor.config.TiersJson; +import com.willfp.ecoarmor.config.EcoArmorJson; import com.willfp.ecoarmor.display.ArmorDisplay; import com.willfp.ecoarmor.effects.Effect; import com.willfp.ecoarmor.effects.Effects; @@ -38,17 +38,11 @@ public class EcoArmorPlugin extends EcoPlugin { @Getter private static EcoArmorPlugin instance; - /** - * sets.json. - */ - @Getter - private final SetsJson setsJson; - /** * tiers.json. */ @Getter - private final TiersJson tiersJson; + private final EcoArmorJson ecoArmorJson; /** * Internal constructor called by bukkit on plugin load. @@ -57,8 +51,7 @@ public class EcoArmorPlugin extends EcoPlugin { super("EcoArmor", 88246, 10002, "com.willfp.ecoarmor.proxy", "&c"); instance = this; - this.setsJson = new SetsJson(this); - this.tiersJson = new TiersJson(this); + this.ecoArmorJson = new EcoArmorJson(this); } /** @@ -133,7 +126,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..6b14615 --- /dev/null +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEaeditor.java @@ -0,0 +1,30 @@ +package com.willfp.ecoarmor.commands; + +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.command.AbstractCommand; +import com.willfp.eco.core.web.Paste; +import com.willfp.ecoarmor.EcoArmorPlugin; +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) { + String token = new Paste(((EcoArmorPlugin) this.getPlugin()).getEcoArmorJson().toPlaintext()).getHastebinToken(); + String message = this.getPlugin().getLangYml().getMessage("open-editor") + .replace("%url%", "https://auxilor.io/editor/ecoarmor?token=" + token); + sender.sendMessage(message); + } +} diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/TiersJson.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/EcoArmorJson.java similarity index 64% rename from eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/TiersJson.java rename to eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/EcoArmorJson.java index 669eee1..e29b167 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/TiersJson.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/EcoArmorJson.java @@ -4,13 +4,13 @@ import com.willfp.eco.core.EcoPlugin; import com.willfp.eco.core.config.JsonStaticBaseConfig; import org.jetbrains.annotations.NotNull; -public class TiersJson extends JsonStaticBaseConfig { +public class EcoArmorJson extends JsonStaticBaseConfig { /** * Create tiers.json. * * @param plugin Instance of EcoArmor. */ - public TiersJson(@NotNull final EcoPlugin plugin) { - super("tiers", plugin); + public EcoArmorJson(@NotNull final EcoPlugin plugin) { + super("ecoarmor", plugin); } } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/SetsJson.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/SetsJson.java deleted file mode 100644 index 6e86674..0000000 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/config/SetsJson.java +++ /dev/null @@ -1,16 +0,0 @@ -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 SetsJson extends JsonStaticBaseConfig { - /** - * Create sets.json. - * - * @param plugin Instance of EcoArmor. - */ - public SetsJson(@NotNull final EcoPlugin plugin) { - super("sets", plugin); - } -} 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 b260fef..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 @@ -51,7 +51,7 @@ public class ArmorSets { removeSet(set); } - for (JSONConfig setConfig : plugin.getSetsJson().getSubsections("sets")) { + 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/upgrades/Tiers.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/upgrades/Tiers.java index e5eec3b..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 @@ -65,7 +65,7 @@ public class Tiers { public static void reload(@NotNull final EcoArmorPlugin plugin) { BY_NAME.clear(); - for (JSONConfig tierConfig : plugin.getTiersJson().getSubsections("tiers")) { + for (JSONConfig tierConfig : plugin.getEcoArmorJson().getSubsections("tiers")) { addNewTier(new Tier(tierConfig, plugin)); } diff --git a/eco-core/core-plugin/src/main/resources/sets.json b/eco-core/core-plugin/src/main/resources/ecoarmor.json similarity index 61% rename from eco-core/core-plugin/src/main/resources/sets.json rename to eco-core/core-plugin/src/main/resources/ecoarmor.json index 57485f6..9bfdfa8 100644 --- a/eco-core/core-plugin/src/main/resources/sets.json +++ b/eco-core/core-plugin/src/main/resources/ecoarmor.json @@ -1,4 +1,603 @@ { + "tiers": [ + { + "name": "default", + "display": "&8&lDEFAULT", + "requires-tiers": [], + "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 + } + } + }, + { + "name": "iron", + "display": "&7&lIRON", + "requires-tiers": [ + "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 + } + } + }, + { + "name": "diamond", + "display": "&b&lDIAMOND", + "requires-tiers": [ + "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 + } + } + }, + { + "name": "netherite", + "display": "&c&lNETHERITE", + "requires-tiers": [ + "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 + } + } + }, + { + "name": "manyullyn", + "enabled": true, + "display": "&d&k!!&r &lMANYULLYN&r &d&k!!&r", + "requires-tiers": [ + "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 + } + } + }, + { + "name": "cobalt", + "display": "/ab&lCOBALT", + "requires-tiers": [ + "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 + } + } + }, + { + "name": "osmium", + "display": "&b&k!!&r &lOSMIUM&r &b&k!!", + "requires-tiers": [ + "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 + } + } + }, + { + "name": "exotic", + "display": "&6&k!!&r &lEXOTIC&r &6&k!!&r", + "requires-tiers": [ + "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 + } + } + } + ], "sets": [ { "name": "ender", 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/tiers.json b/eco-core/core-plugin/src/main/resources/tiers.json deleted file mode 100644 index dcb5884..0000000 --- a/eco-core/core-plugin/src/main/resources/tiers.json +++ /dev/null @@ -1,601 +0,0 @@ -{ - "tiers": [ - { - "name": "default", - "display": "&8&lDEFAULT", - "requires-tiers": [], - "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 - } - } - }, - { - "name": "iron", - "display": "&7&lIRON", - "requires-tiers": [ - "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 - } - } - }, - { - "name": "diamond", - "display": "&b&lDIAMOND", - "requires-tiers": [ - "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 - } - } - }, - { - "name": "netherite", - "display": "&c&lNETHERITE", - "requires-tiers": [ - "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 - } - } - }, - { - "name": "manyullyn", - "enabled": true, - "display": "&d&k!!&r &lMANYULLYN&r &d&k!!&r", - "requires-tiers": [ - "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 - } - } - }, - { - "name": "cobalt", - "display": "/ab&lCOBALT", - "requires-tiers": [ - "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 - } - } - }, - { - "name": "osmium", - "display": "&b&k!!&r &lOSMIUM&r &b&k!!", - "requires-tiers": [ - "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 - } - } - }, - { - "name": "exotic", - "display": "&6&k!!&r &lEXOTIC&r &6&k!!&r", - "requires-tiers": [ - "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