From c27ba6ee0c99887ea683fe2a886b631f73652ad1 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 12 Jan 2022 12:57:12 +0000 Subject: [PATCH] Updated libreforge --- build.gradle | 3 +- .../com/willfp/ecoitems/EcoItemsPlugin.kt | 30 +++++-------------- gradle.properties | 2 +- 3 files changed, 9 insertions(+), 26 deletions(-) diff --git a/build.gradle b/build.gradle index 17cadaf..e1357e1 100644 --- a/build.gradle +++ b/build.gradle @@ -58,12 +58,11 @@ allprojects { shadowJar { relocate('com.willfp.libreforge', 'com.willfp.ecoitems.libreforge') - relocate('redempt.crunch', 'com.willfp.ecoitems.libreforge.crunch') } dependencies { compileOnly 'com.willfp:eco:6.18.1' - implementation 'com.willfp:libreforge:2.18.1' + implementation 'com.willfp:libreforge:3.0.0' compileOnly 'org.jetbrains:annotations:23.0.0' diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoitems/EcoItemsPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoitems/EcoItemsPlugin.kt index c8c14e8..00ce3a5 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoitems/EcoItemsPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoitems/EcoItemsPlugin.kt @@ -1,22 +1,20 @@ package com.willfp.ecoitems -import com.willfp.eco.core.EcoPlugin import com.willfp.eco.core.command.impl.PluginCommand import com.willfp.eco.core.display.DisplayModule -import com.willfp.eco.core.integrations.IntegrationLoader import com.willfp.ecoitems.commands.CommandEcoItems import com.willfp.ecoitems.config.ItemsYml import com.willfp.ecoitems.display.ItemsDisplay import com.willfp.ecoitems.fuels.FuelHandler -import com.willfp.ecoitems.util.DiscoverRecipeListener -import com.willfp.ecoitems.items.ItemListener import com.willfp.ecoitems.items.ItemAttributeListener +import com.willfp.ecoitems.items.ItemListener import com.willfp.ecoitems.items.ItemUtils import com.willfp.ecoitems.items.toSingletonList -import com.willfp.libreforge.LibReforge +import com.willfp.ecoitems.util.DiscoverRecipeListener +import com.willfp.libreforge.LibReforgePlugin import org.bukkit.event.Listener -class EcoItemsPlugin : EcoPlugin(1241, 12205, "&#ff0000", true) { +class EcoItemsPlugin : LibReforgePlugin(1241, 12205, "&#ff0000") { /** * items.yml. */ @@ -28,20 +26,10 @@ class EcoItemsPlugin : EcoPlugin(1241, 12205, "&#ff0000", true) { init { instance = this itemsYml = ItemsYml(this) - LibReforge.init(this) - LibReforge.registerHolderProvider { ItemUtils.getEcoItemOnPlayer(it).toSingletonList() } - } - - override fun handleEnable() { - LibReforge.enable(this) - } - - override fun handleDisable() { - LibReforge.disable(this) + registerHolderProvider { ItemUtils.getEcoItemOnPlayer(it).toSingletonList() } } - override fun handleReload() { - LibReforge.reload(this) + override fun handleReloadAdditional() { FuelHandler.createRunnable(this) } @@ -54,10 +42,6 @@ class EcoItemsPlugin : EcoPlugin(1241, 12205, "&#ff0000", true) { ) } - override fun loadIntegrationLoaders(): List { - return LibReforge.getIntegrationLoaders() - } - override fun loadPluginCommands(): List { return listOf( CommandEcoItems(this) @@ -69,7 +53,7 @@ class EcoItemsPlugin : EcoPlugin(1241, 12205, "&#ff0000", true) { } override fun getMinimumEcoVersion(): String { - return "6.15.0" + return "6.19.0" } companion object { diff --git a/gradle.properties b/gradle.properties index 84a99dc..f356b45 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 3.9.3 +version = 3.10.0 plugin-name = EcoItems \ No newline at end of file