fix me being stupid

This commit is contained in:
alexcrea 2025-03-22 18:54:44 +01:00
parent 7f15e0eb55
commit f02ac69928
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
2 changed files with 3 additions and 1 deletions

View file

@ -209,7 +209,7 @@ object DependencyManager {
enchantmentSquaredCompatibility?.stripLore(dummy)
val itemLore = item.itemMeta!!.lore
val itemLore = dummy.itemMeta!!.lore
if (itemLore != null) lore.addAll(itemLore)
return lore

View file

@ -63,6 +63,7 @@ object AnvilLoreEditUtil {
val result = first.clone()
val leftMeta = result.itemMeta ?: return null
val currentLore: ArrayList<String> = DependencyManager.stripLore(result)
if(currentLore.isEmpty()) return null
val uncolorCost = uncolorLines(player, currentLore, LoreEditType.REMOVE_BOOK)
@ -186,6 +187,7 @@ object AnvilLoreEditUtil {
val removeEnd = LoreEditConfigUtil.paperLoreOrderIsEnd
val lore: ArrayList<String> = DependencyManager.stripLore(result)
if(lore.isEmpty()) return null
val line = if (removeEnd) lore.removeAt(lore.size - 1)
else lore.removeAt(0)