From 61f131b480dee7360c20df7993c5d0c388876055 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Sat, 5 Feb 2022 13:21:56 +0000 Subject: [PATCH] Updated libreforge --- eco-core/build.gradle | 2 +- .../willfp/ecoenchants/EcoEnchantsPlugin.java | 7 ++++++- .../src/main/resources/customenchants.yml | 20 +++++++++++++++++++ gradle.properties | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/eco-core/build.gradle b/eco-core/build.gradle index 8491a801..e815c855 100644 --- a/eco-core/build.gradle +++ b/eco-core/build.gradle @@ -3,6 +3,6 @@ version rootProject.version subprojects { dependencies { - implementation 'com.willfp:libreforge:3.13.1' + implementation 'com.willfp:libreforge:3.14.2' } } \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/EcoEnchantsPlugin.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/EcoEnchantsPlugin.java index ec2e8789..5240f9bc 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/EcoEnchantsPlugin.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/EcoEnchantsPlugin.java @@ -1,6 +1,7 @@ package com.willfp.ecoenchants; import com.willfp.eco.core.command.impl.PluginCommand; +import com.willfp.eco.core.config.interfaces.Config; import com.willfp.eco.core.display.DisplayModule; import com.willfp.eco.core.fast.FastItemStack; import com.willfp.eco.core.integrations.IntegrationLoader; @@ -15,7 +16,6 @@ import com.willfp.ecoenchants.display.EnchantDisplay; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.custom.CustomEcoEnchantRequirementListeners; -import com.willfp.ecoenchants.enchantments.custom.CustomEcoEnchants; import com.willfp.ecoenchants.enchantments.custom.CustomEnchantEnableListeners; import com.willfp.ecoenchants.enchantments.custom.CustomEnchantLookup; import com.willfp.ecoenchants.enchantments.support.merging.anvil.AnvilListeners; @@ -32,6 +32,7 @@ import com.willfp.ecoenchants.integrations.registration.RegistrationManager; import com.willfp.ecoenchants.integrations.registration.plugins.IntegrationCMI; import com.willfp.ecoenchants.integrations.registration.plugins.IntegrationEssentials; import com.willfp.libreforge.LibReforgePlugin; +import com.willfp.libreforge.chains.EffectChains; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.event.HandlerList; @@ -88,6 +89,10 @@ public class EcoEnchantsPlugin extends LibReforgePlugin { @Override public void handleEnableAdditional() { + for (Config config : customEnchantsYml.getSubsections("chains")) { + EffectChains.compile(config, "Custom Enchant Chains"); + } + this.getLogger().info(EcoEnchants.values().size() + " Enchantments Loaded"); TelekinesisUtils.registerTest(player -> FastItemStack.wrap(player.getInventory().getItemInMainHand()).getLevelOnItem(EcoEnchants.TELEKINESIS, false) > 0); diff --git a/eco-core/core-plugin/src/main/resources/customenchants.yml b/eco-core/core-plugin/src/main/resources/customenchants.yml index a4409e8b..079df516 100644 --- a/eco-core/core-plugin/src/main/resources/customenchants.yml +++ b/eco-core/core-plugin/src/main/resources/customenchants.yml @@ -1,3 +1,23 @@ +chains: + - id: example_chain + effects: + - id: teleport + - id: potion_effect + args: + effect: blindness + level: 3 + duration: 30 + apply_to_player: true + - id: send_message + args: + message: "&fYou have been teleported!" + action_bar: true + - id: play_sound + args: + sound: entity_dragon_fireball_explode + pitch: 1.5 + volume: 4 + enchants: - id: escape type: normal diff --git a/gradle.properties b/gradle.properties index c3f17b5b..9dd47d9f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 8.35.1 +version = 8.36.0 plugin-name = EcoEnchants \ No newline at end of file