aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/repo/ItemCache.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-02-09 12:00:50 +0100
committerLinnea Gräf <nea@nea.moe>2024-02-09 12:00:50 +0100
commitefbef712130048e1bf39e66b15271bf663586eee (patch)
tree5260c953cdb3825128d43323a7de6557561cb7af /src/main/kotlin/moe/nea/firmament/repo/ItemCache.kt
parent0cb6e308acc313a22f9fd796cc47301272485120 (diff)
downloadfirmament-efbef712130048e1bf39e66b15271bf663586eee.tar.gz
firmament-efbef712130048e1bf39e66b15271bf663586eee.tar.bz2
firmament-efbef712130048e1bf39e66b15271bf663586eee.zip
Fix crash when rendering SkyBlock id in a string
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/repo/ItemCache.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/repo/ItemCache.kt11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/repo/ItemCache.kt b/src/main/kotlin/moe/nea/firmament/repo/ItemCache.kt
index 0688497..067069b 100644
--- a/src/main/kotlin/moe/nea/firmament/repo/ItemCache.kt
+++ b/src/main/kotlin/moe/nea/firmament/repo/ItemCache.kt
@@ -14,7 +14,7 @@ import io.github.moulberry.repo.IReloadable
import io.github.moulberry.repo.NEURepository
import io.github.moulberry.repo.data.NEUItem
import java.text.NumberFormat
-import java.util.UUID
+import java.util.*
import java.util.concurrent.ConcurrentHashMap
import org.apache.logging.log4j.LogManager
import kotlinx.coroutines.Job
@@ -74,7 +74,14 @@ object ItemCache : IReloadable {
fun brokenItemStack(neuItem: NEUItem?, idHint: SkyblockId? = null): ItemStack {
return ItemStack(Items.PAINTING).apply {
setCustomName(Text.literal(neuItem?.displayName ?: idHint?.neuItem ?: "null"))
- appendLore(listOf(Text.translatable("firmament.repo.brokenitem", neuItem?.skyblockItemId ?: idHint)))
+ appendLore(
+ listOf(
+ Text.stringifiedTranslatable(
+ "firmament.repo.brokenitem",
+ (neuItem?.skyblockItemId ?: idHint)
+ )
+ )
+ )
}
}