diff options
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt b/src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt index cccff64..4f8c90c 100644 --- a/src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt +++ b/src/main/kotlin/moe/nea/firmament/util/ItemUtil.kt @@ -17,17 +17,17 @@ fun ItemStack.appendLore(args: List<Text>) { val compoundTag = getOrCreateSubNbt("display") val loreList = compoundTag.getOrCreateList("Lore", NbtString.STRING_TYPE) for (arg in args) { - loreList.add(NbtString.of(Text.Serializer.toJson(arg))) + loreList.add(NbtString.of(Text.Serialization.toJsonString(arg))) } } fun ItemStack.modifyLore(update: (List<Text>) -> List<Text>) { val compoundTag = getOrCreateSubNbt("display") val loreList = compoundTag.getOrCreateList("Lore", NbtString.STRING_TYPE) - val parsed = loreList.map { Text.Serializer.fromJson(it.asString())!! } + val parsed = loreList.map { Text.Serialization.fromJson(it.asString())!! } val updated = update(parsed) loreList.clear() - loreList.addAll(updated.map { NbtString.of(Text.Serializer.toJson(it)) }) + loreList.addAll(updated.map { NbtString.of(Text.Serialization.toJsonString(it)) }) } |