Interface ItemBody<I,B extends TextBody<B>,T extends ItemBody<I,B,T>>

Type Parameters:
I - the type of item for the item body
B - the type of text body for the description
T - the type of item body for method chaining
All Known Implementing Classes:
PaperItemBody, PEItemBody, SpigotItemBody

public interface ItemBody<I,B extends TextBody<B>,T extends ItemBody<I,B,T>>
Interface for building item bodies in a dialog.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    description(@Nullable Consumer<B> descriptionBuilder)
    Set the description for the body
    height(int height)
    Set the height of the item body
    item(I item)
    Set the item for the body
    showDecorations(boolean showDecorations)
    Set the option to show decorations in the body
    showTooltip(boolean showTooltip)
    Set the option to show a tooltip in the body
    width(int width)
    Set the width of the item body
  • Field Details

  • Method Details

    • item

      T item(I item)
      Set the item for the body
      Parameters:
      item - the item to set
      Returns:
      the instance of the item body for method chaining
    • description

      T description(@Nullable @Nullable Consumer<B> descriptionBuilder)
      Set the description for the body
      Parameters:
      descriptionBuilder - a consumer to build the description
      Returns:
      the instance of the item body for method chaining
    • showDecorations

      T showDecorations(boolean showDecorations)
      Set the option to show decorations in the body
      Parameters:
      showDecorations - whether to show decorations
      Returns:
      the instance of the item body for method chaining
    • showTooltip

      T showTooltip(boolean showTooltip)
      Set the option to show a tooltip in the body
      Parameters:
      showTooltip - whether to show a tooltip
      Returns:
      the instance of the item body for method chaining
    • width

      T width(int width)
      Set the width of the item body
      Parameters:
      width - the width to set
      Returns:
      the instance of the item body for method chaining
    • height

      T height(int height)
      Set the height of the item body
      Parameters:
      height - the height to set
      Returns:
      the instance of the item body for method chaining