-
Notifications
You must be signed in to change notification settings - Fork 0
ItemDisplay
wjddusrb03 edited this page Mar 29, 2026
·
1 revision
Creates item displays using Minecraft's ItemDisplay entity.
SpawnedDisplay display = DisplayAPI.item(location)
.item(new ItemStack(Material.DIAMOND_SWORD))
.spawn();Sets the displayed item.
.item(new ItemStack(Material.DIAMOND_SWORD))
// Custom item with enchantment glow
ItemStack sword = new ItemStack(Material.NETHERITE_SWORD);
sword.addEnchantment(Enchantment.SHARPNESS, 5);
.item(sword)Shorthand for a simple item.
.item(Material.GOLDEN_APPLE)Sets how the item is rendered.
Options: NONE, THIRDPERSON_LEFTHAND, THIRDPERSON_RIGHTHAND, FIRSTPERSON_LEFTHAND, FIRSTPERSON_RIGHTHAND, HEAD, GUI, GROUND, FIXED
.transform(ItemDisplay.ItemDisplayTransform.GROUND)
.transform(ItemDisplay.ItemDisplayTransform.GUI)SpawnedDisplay item = DisplayAPI.item(location)
.item(new ItemStack(Material.NETHER_STAR))
.billboard(Billboard.CENTER)
.glow(Color.YELLOW)
.spawn();
DisplayAPI.animate(item)
.floating(0.3f, 40)
.loop(true)
.play();See also: Common-Properties for shared builder options.