Use new ItemStack#displayName Paper API

This commit is contained in:
jmp committed 2021-05-12 23:56:02 -07:00
1 parent f3a734601e
commit b2f5b2c605
4 files changed
+6 -33

No files matched your search

@@ -76,10 +76,8 @@ public final class CarbonPlayerSponge extends CarbonPlayerCommon {
return Component.empty();
}
final Component displayName = itemStack.get(Keys.DISPLAY_NAME)
return itemStack.get(Keys.DISPLAY_NAME)
.orElse(itemStack.type().asComponent());
return this.createItemHoverComponent(displayName, itemStack.createSnapshot());
}
}