Skip to content

Commit aba1110

Browse files
committed
fix wrong case of "Count" uses in item
1 parent fb0d193 commit aba1110

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

modules/library/src/main/java/top/mrxiaom/pluginbase/utils/AdventureItemStack.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,13 @@ public static HoverEventSource<?> toHoverEvent(ItemStack item) {
269269
} else { // 未知格式
270270
itemTag = BinaryTagHolder.binaryTagHolder("{}");
271271
}
272+
273+
int count = nbt.hasTag("Count")
274+
? nbt.getInteger("Count")
275+
: nbt.getInteger("count");
272276
return HoverEvent.showItem(
273277
Key.key(nbt.getString("id"), ':'),
274-
nbt.getInteger("count"),
278+
count,
275279
itemTag);
276280
}
277281

0 commit comments

Comments
 (0)