mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Merge branch 'v1.x.x' into v2.x.x-merging
# Conflicts: # src/main/kotlin/xyz/alexcrea/cuanvil/listener/PrepareAnvilListener.kt
This commit is contained in:
commit
286446336f
1 changed files with 2 additions and 3 deletions
|
|
@ -87,10 +87,9 @@ class PrepareAnvilListener : Listener {
|
||||||
doRenaming(event, view, player, first)
|
doRenaming(event, view, player, first)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
second as ItemStack // not air we know it's not null
|
|
||||||
|
|
||||||
// Test for merge
|
// Test for merge
|
||||||
if (first.canMergeWith(second)) {
|
if (first.canMergeWith(second!!)) {
|
||||||
doMerge(event, view, player, first, second)
|
doMerge(event, view, player, first, second)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -109,7 +108,7 @@ class PrepareAnvilListener : Listener {
|
||||||
private fun isImmutable(item: ItemStack?): Boolean {
|
private fun isImmutable(item: ItemStack?): Boolean {
|
||||||
if (item.isAir()) return false
|
if (item.isAir()) return false
|
||||||
|
|
||||||
val meta = item.itemMeta
|
val meta = item!!.itemMeta
|
||||||
return meta != null &&
|
return meta != null &&
|
||||||
(hasImmutableEnchants(meta) || hasImmutableStoredEnchants(meta))
|
(hasImmutableEnchants(meta) || hasImmutableStoredEnchants(meta))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue