mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-15 04:21:20 +01:00
Improvements to NMS registration
This commit is contained in:
parent
b88a1483e1
commit
0b27b46d48
@ -111,4 +111,8 @@ class DelegatedCraftEnchantment(
|
||||
override fun hashCode(): Int {
|
||||
return Objects.hash(this.key)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "DelegatedCraftEnchantment(key=$key)"
|
||||
}
|
||||
}
|
||||
|
@ -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<EquipmentSlot, ItemStack> {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user