FakeItem

public interface FakeItem

A fake item entity that displays an item to players using packet-based entities. Uses ItemDisplay for visual representation without creating a real pickable item.

This is ideal for visual effects like coin showers, loot previews, or any situation where you want to show an item without it being pickable by hoppers or other plugins.

Types

Link copied to clipboard
public interface Builder
Builder for creating FakeItem instances with custom styling.

Functions

Link copied to clipboard
public abstract void displayTo(UUID uuid)
Displays this fake item to a player by UUID.
public abstract void displayTo(Player player)
Displays this fake item to a player.
Link copied to clipboard
public abstract ItemStack getItemStack()
Gets the current displayed item.
Link copied to clipboard
public abstract Location getLocation()
Gets the current location of this fake item.
Link copied to clipboard
public abstract boolean hasViewers()
Checks if this fake item has any viewers.
Link copied to clipboard
public abstract void hideFrom(UUID uuid)
Hides this fake item from a player by UUID.
public abstract void hideFrom(Player player)
Hides this fake item from a player.
Link copied to clipboard
public abstract void remove()
Removes this fake item from all viewers and cleans up resources.
Link copied to clipboard
public void setBillboard(Display.Billboard billboard)
Sets the billboard mode.
Link copied to clipboard
public void setCustomName(String name)
Sets the custom name displayed above the item.
Link copied to clipboard
public void setCustomNameVisible(boolean visible)
Sets whether the custom name is visible.
Link copied to clipboard
public void setGlowing(boolean glowing)
Sets whether the item should glow.
Link copied to clipboard
public abstract void setItemStack(ItemStack itemStack)
Sets the item to display.
Link copied to clipboard
public void setScale(float scale)
Sets the scale of the item display.
Link copied to clipboard
public abstract void setVisible(boolean visible)
Sets whether the item display is visible.
Link copied to clipboard
public void setYawRotation(float yawDegrees)
Sets the Y-axis rotation (yaw) of the item display in degrees.
Link copied to clipboard
public abstract void teleport(Location location)
Teleports this fake item to a new location.