Interface ItemRenderer

All Known Implementing Classes:
PaperItemRenderer

@NonExtendable public interface ItemRenderer
Turns item descriptions into stacks. Framework singleton; thread-safe; requires a running server.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.inventory.ItemStack
    render(ItemSpec spec, Locale locale)
    Creates a new independent stack for the locale: typed attributes first, then patches in order, then persistent-data markers.
    org.bukkit.inventory.ItemStack
    render(ItemSpec spec, net.kyori.adventure.audience.Audience viewer)
    Renders using localeResolver.resolve(viewer).
  • Method Details

    • render

      org.bukkit.inventory.ItemStack render(ItemSpec spec, Locale locale)
      Creates a new independent stack for the locale: typed attributes first, then patches in order, then persistent-data markers. Text uses the framework's Messages lookup order. Air is rejected at build time. TOOLTIP_DISPLAY is written only when ItemSpec.tooltipHidden() is true or ItemSpec.hiddenInTooltip() is nonempty.
      Throws:
      IllegalArgumentException - if the item type is not an item in the running server's registry, or if Paper rejects the rendered components (for example more lore lines than Paper allows)
    • render

      org.bukkit.inventory.ItemStack render(ItemSpec spec, net.kyori.adventure.audience.Audience viewer)
      Renders using localeResolver.resolve(viewer).