diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEcoarmor.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEcoarmor.java index d4513f0..361c50b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEcoarmor.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEcoarmor.java @@ -16,8 +16,7 @@ public class CommandEcoarmor extends PluginCommand { super(plugin, "ecoarmor", "ecoarmor.command.ecoarmor", false); this.addSubcommand(new CommandReload(plugin)) - .addSubcommand(new CommandGive(plugin)) - .addSubcommand(new CommandEditor(plugin)); + .addSubcommand(new CommandGive(plugin)); } @Override diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEditor.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEditor.java deleted file mode 100644 index 538c427..0000000 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/commands/CommandEditor.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.willfp.ecoarmor.commands; - -import com.willfp.eco.core.EcoPlugin; -import com.willfp.eco.core.command.CommandHandler; -import com.willfp.eco.core.command.impl.Subcommand; -import com.willfp.eco.core.config.interfaces.JSONConfig; -import com.willfp.eco.core.web.Paste; -import com.willfp.eco.util.StringUtils; -import com.willfp.ecoarmor.EcoArmorPlugin; -import com.willfp.libreforge.api.conditions.Condition; -import com.willfp.libreforge.api.conditions.Conditions; -import com.willfp.libreforge.api.effects.Effect; -import com.willfp.libreforge.api.effects.Effects; -import org.bukkit.NamespacedKey; -import org.bukkit.enchantments.Enchantment; -import org.bukkit.potion.PotionEffectType; -import org.jetbrains.annotations.NotNull; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -public class CommandEditor extends Subcommand { - /** - * Instantiate a new /eaeditor command handler. - * - * @param plugin The plugin for the commands to listen for. - */ - public CommandEditor(@NotNull final EcoPlugin plugin) { - super(plugin, "editor", "ecoarmor.command.editor", false); - } - - @Override - public CommandHandler getHandler() { - return (sender, 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.INSTANCE.values().stream().map(Effect::getId).collect(Collectors.toList()); - meta.put("effects", effects); - - List conditions = Conditions.INSTANCE.values().stream().map(Condition::getId).collect(Collectors.toList()); - meta.put("conditions", conditions); - - config.set("meta", meta); - new Paste(config.toPlaintext()).getHastebinToken(token -> { - sender.sendMessage(StringUtils.format("&cThe editor is coming soon!") + token); - }); - }; - } -} diff --git a/eco-core/core-plugin/src/main/resources/lang.yml b/eco-core/core-plugin/src/main/resources/lang.yml index e33dc26..2f18190 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -9,5 +9,4 @@ messages: needs-item: "&cYou must specify an item!" invalid-item: "&cInvalid item!" give-success: "Gave &a%item%&r to &a%recipient%" - open-editor: "Open the editor here: &a%url%" on-cooldown: "&cThis effect is on cooldown! &fTime left: &a%seconds% seconds" \ 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 844e8ff..9c48856 100644 --- a/eco-core/core-plugin/src/main/resources/plugin.yml +++ b/eco-core/core-plugin/src/main/resources/plugin.yml @@ -29,7 +29,6 @@ permissions: ecoarmor.command.reload: true ecoarmor.command.ecoarmor: true ecoarmor.command.give: true - ecoarmor.command.editor: true ecoarmor.command.reload: description: Allows reloading the config @@ -40,9 +39,6 @@ permissions: ecoarmor.noflydisable: description: Prevents losing fly. default: op - ecoarmor.command.editor: - description: Allows the user of /ecoarmor editor. - default: op ecoarmor.command.ecoarmor: description: Allows the user of /ecoarmor. default: true