diff --git a/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/DelegatedCraftEnchantment.kt b/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/DelegatedCraftEnchantment.kt index 8a0634a2..2b1f42c8 100644 --- a/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/DelegatedCraftEnchantment.kt +++ b/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/DelegatedCraftEnchantment.kt @@ -111,4 +111,8 @@ class DelegatedCraftEnchantment( override fun hashCode(): Int { return Objects.hash(this.key) } + + override fun toString(): String { + return "DelegatedCraftEnchantment(key=$key)" + } } diff --git a/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/VanillaEcoEnchantsEnchantment.kt b/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/VanillaEcoEnchantsEnchantment.kt index 90e8a643..3838857e 100644 --- a/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/VanillaEcoEnchantsEnchantment.kt +++ b/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/VanillaEcoEnchantsEnchantment.kt @@ -12,6 +12,7 @@ import net.minecraft.world.item.enchantment.Enchantment import net.minecraft.world.item.enchantment.EnchantmentCategory import org.bukkit.craftbukkit.v1_20_R3.enchantments.CraftEnchantment import org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack +import java.util.Objects class VanillaEcoEnchantsEnchantment( private val id: String @@ -81,4 +82,16 @@ class VanillaEcoEnchantsEnchantment( override fun getSlotItems(entity: LivingEntity): MutableMap { return mutableMapOf() } + + override fun toString(): String { + return "VanillaEcoEnchantsEnchantment(id='$id')" + } + + override fun equals(other: Any?): Boolean { + return other is VanillaEcoEnchantsEnchantment && other.id == this.id + } + + override fun hashCode(): Int { + return Objects.hash(id) + } }