mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-08-28 08:25:56 +02:00
This commit is contained in:
parent
75b32bcf52
commit
643a5e9a8c
2 changed files with 14 additions and 11 deletions
|
|
@ -22,7 +22,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "xyz.alexcrea"
|
group = "xyz.alexcrea"
|
||||||
version = "2.0.0"
|
version = "2.0.1"
|
||||||
|
|
||||||
val isDevBuild = System.getenv("SMALL_COMMIT_HASH") != null
|
val isDevBuild = System.getenv("SMALL_COMMIT_HASH") != null
|
||||||
val isPreRelease = System.getenv("IS_GITHUB_PRERELEASE") == "true"
|
val isPreRelease = System.getenv("IS_GITHUB_PRERELEASE") == "true"
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.willfp.ecoenchants.enchant.EcoEnchant
|
||||||
import com.willfp.ecoenchants.enchant.EcoEnchants
|
import com.willfp.ecoenchants.enchant.EcoEnchants
|
||||||
import com.willfp.ecoenchants.enchant.UtilKt
|
import com.willfp.ecoenchants.enchant.UtilKt
|
||||||
import io.delilaheve.CustomAnvil
|
import io.delilaheve.CustomAnvil
|
||||||
|
import org.bukkit.Bukkit
|
||||||
import org.bukkit.event.inventory.PrepareAnvilEvent
|
import org.bukkit.event.inventory.PrepareAnvilEvent
|
||||||
import org.bukkit.plugin.Plugin
|
import org.bukkit.plugin.Plugin
|
||||||
import xyz.alexcrea.cuanvil.api.EnchantmentApi
|
import xyz.alexcrea.cuanvil.api.EnchantmentApi
|
||||||
|
|
@ -34,12 +35,14 @@ class EcoEnchantDependency(private val ecoEnchantPlugin: Plugin) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public fun getEcoLevelLimit(): Int {
|
fun getEcoLevelLimit(): Int {
|
||||||
return UtilKt.infiniteIfNegative((ecoEnchantPlugin as EcoPlugin).configYml.getInt("anvil.enchant-limit"))
|
return UtilKt.infiniteIfNegative((ecoEnchantPlugin as EcoPlugin).configYml.getInt("anvil.enchant-limit"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun disableAnvilListener() {
|
fun disableAnvilListener() {
|
||||||
PrepareAnvilEvent.getHandlerList().unregister(this.ecoEnchantPlugin)
|
PrepareAnvilEvent.getHandlerList().unregister(this.ecoEnchantPlugin)
|
||||||
|
// I don't like that but modern ee use eco prepare anvil event
|
||||||
|
PrepareAnvilEvent.getHandlerList().unregister(Bukkit.getPluginManager().getPlugin("eco")!!)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var ecoEnchantOldEnchantments: MutableSet<EcoEnchant>? = null
|
private var ecoEnchantOldEnchantments: MutableSet<EcoEnchant>? = null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue