mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-08-28 08:25:56 +02:00
remove use of customname as not used under 1.21.4
This commit is contained in:
parent
7b232528f1
commit
8830b4c4ed
1 changed files with 1 additions and 10 deletions
|
|
@ -67,14 +67,7 @@ object PlatformUtil {
|
|||
}
|
||||
}
|
||||
|
||||
// Display name
|
||||
private val useCustomName = hasMethod(ItemStack::class.java, "customName")
|
||||
|
||||
fun ItemMeta.componentDisplayName(): Component? {
|
||||
if (useCustomName) {
|
||||
if (!this.hasCustomName()) return null
|
||||
return this.customName()
|
||||
}
|
||||
if (!this.hasDisplayName()) return null
|
||||
|
||||
return if (isPaper) {
|
||||
|
|
@ -85,9 +78,7 @@ object PlatformUtil {
|
|||
}
|
||||
|
||||
fun ItemMeta.setComponentDisplayName(component: Component?, fallback: String? = null) {
|
||||
if (useCustomName) {
|
||||
this.customName(component)
|
||||
} else if (isPaper) {
|
||||
if (isPaper) {
|
||||
this.displayName(component)
|
||||
} else {
|
||||
if (component == null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue