diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlugin.kt index c659d1ca..49983cb5 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlugin.kt @@ -2,7 +2,6 @@ package com.willfp.ecoskills import com.willfp.eco.core.command.impl.PluginCommand import com.willfp.eco.core.packet.PacketListener -import com.willfp.eco.util.containsIgnoreCase import com.willfp.ecoskills.actionbar.ActionBarCompatibilityProxy import com.willfp.ecoskills.actionbar.ActionBarGamemodeListener import com.willfp.ecoskills.actionbar.ActionBarHandler @@ -30,7 +29,6 @@ import com.willfp.libreforge.conditions.Conditions import com.willfp.libreforge.filters.Filters import com.willfp.libreforge.loader.LibreforgePlugin import com.willfp.libreforge.loader.configs.ConfigCategory -import com.willfp.libreforge.registerHolderProvider import com.willfp.libreforge.registerSpecificHolderProvider import com.willfp.libreforge.triggers.Triggers import org.bukkit.entity.Player @@ -73,8 +71,8 @@ class EcoSkillsPlugin : LibreforgePlugin() { com.willfp.libreforge.effects.Effects.register(EffectAddStatTemporarily(this)) com.willfp.libreforge.effects.Effects.register(EffectMultiplyStatTemporarily(this)) com.willfp.libreforge.effects.Effects.register(EffectMagicRegenMultiplier) - Conditions.register(ConditionAboveStat) - Conditions.register(ConditionBelowStat) + Conditions.register(ConditionStatAbove) + Conditions.register(ConditionStatBelow) Conditions.register(ConditionStatEquals) Conditions.register(ConditionHasSkillLevel) Conditions.register(ConditionBelowMagic) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionAboveStat.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionStatAbove.kt similarity index 80% rename from eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionAboveStat.kt rename to eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionStatAbove.kt index 8eb32e29..c517ecd8 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionAboveStat.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionStatAbove.kt @@ -1,9 +1,7 @@ package com.willfp.ecoskills.libreforge import com.willfp.eco.core.config.interfaces.Config -import com.willfp.ecoskills.api.getMagic import com.willfp.ecoskills.api.getStatLevel -import com.willfp.ecoskills.magic.MagicTypes import com.willfp.ecoskills.stats.Stats import com.willfp.libreforge.Dispatcher import com.willfp.libreforge.NoCompileData @@ -13,10 +11,10 @@ import com.willfp.libreforge.conditions.Condition import com.willfp.libreforge.get import org.bukkit.entity.Player -object ConditionAboveStat : Condition("above_stat") { +object ConditionStatAbove : Condition("stat_above") { override val arguments = arguments { require("stat", "You must specify the stat!") - require("amount", "You must specify the amount!") + require("level", "You must specify the level!") } override fun isMet( @@ -29,6 +27,6 @@ object ConditionAboveStat : Condition("above_stat") { val type = Stats.getByID(config.getString("stat").lowercase()) ?: return false - return player.getStatLevel(type) >= config.getIntFromExpression("amount", player) + return player.getStatLevel(type) >= config.getIntFromExpression("level", player) } } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionBelowStat.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionStatBelow.kt similarity index 80% rename from eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionBelowStat.kt rename to eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionStatBelow.kt index ac6dcacc..390810ec 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionBelowStat.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionStatBelow.kt @@ -1,9 +1,7 @@ package com.willfp.ecoskills.libreforge import com.willfp.eco.core.config.interfaces.Config -import com.willfp.ecoskills.api.getMagic import com.willfp.ecoskills.api.getStatLevel -import com.willfp.ecoskills.magic.MagicTypes import com.willfp.ecoskills.stats.Stats import com.willfp.libreforge.Dispatcher import com.willfp.libreforge.NoCompileData @@ -13,10 +11,10 @@ import com.willfp.libreforge.conditions.Condition import com.willfp.libreforge.get import org.bukkit.entity.Player -object ConditionBelowStat : Condition("below_stat") { +object ConditionStatBelow : Condition("stat_below") { override val arguments = arguments { require("stat", "You must specify the stat!") - require("amount", "You must specify the amount!") + require("level", "You must specify the level!") } override fun isMet( @@ -29,6 +27,6 @@ object ConditionBelowStat : Condition("below_stat") { val type = Stats.getByID(config.getString("stat").lowercase()) ?: return false - return player.getStatLevel(type) < config.getIntFromExpression("amount", player) + return player.getStatLevel(type) < config.getIntFromExpression("level", player) } } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionStatEquals.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionStatEquals.kt index e49f0d40..cceab33b 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionStatEquals.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/libreforge/ConditionStatEquals.kt @@ -1,9 +1,7 @@ package com.willfp.ecoskills.libreforge import com.willfp.eco.core.config.interfaces.Config -import com.willfp.ecoskills.api.getMagic import com.willfp.ecoskills.api.getStatLevel -import com.willfp.ecoskills.magic.MagicTypes import com.willfp.ecoskills.stats.Stats import com.willfp.libreforge.Dispatcher import com.willfp.libreforge.NoCompileData @@ -16,7 +14,7 @@ import org.bukkit.entity.Player object ConditionStatEquals : Condition("stat_equals") { override val arguments = arguments { require("stat", "You must specify the stat!") - require("amount", "You must specify the amount!") + require("level", "You must specify the level!") } override fun isMet(