Class DialogBody.Item.Builder

java.lang.Object
fr.fidorial.dialog.DialogBody.Item.Builder
Enclosing class:
DialogBody.Item

public static final class DialogBody.Item.Builder extends Object
Fluent builder for DialogBody.Item.
Since:
0.1.0
  • Method Details

    • item

      @Contract("_ -> this") public DialogBody.Item.Builder item(ItemStack item)
      Parameters:
      item - the stack to display
      Returns:
      this builder
      Since:
      0.1.0
    • description

      @Contract("_ -> this") public DialogBody.Item.Builder description(ComponentLike description)
      Parameters:
      description - the label shown next to the item
      Returns:
      this builder
      Since:
      0.1.0
    • description

      @Contract("_ -> this") public DialogBody.Item.Builder description(@Nullable DialogBody.PlainMessage description)
      Parameters:
      description - the label shown next to the item, or null for none
      Returns:
      this builder
      Since:
      0.1.0
    • showDecoration

      @Contract("_ -> this") public DialogBody.Item.Builder showDecoration(boolean showDecoration)
      Parameters:
      showDecoration - whether the stack count and damage bar are drawn over the item
      Returns:
      this builder
      Since:
      0.1.0
    • showTooltip

      @Contract("_ -> this") public DialogBody.Item.Builder showTooltip(boolean showTooltip)
      Parameters:
      showTooltip - whether hovering the item pops its tooltip up
      Returns:
      this builder
      Since:
      0.1.0
    • size

      @Contract("_, _ -> this") public DialogBody.Item.Builder size(int width, int height)
      Parameters:
      width - horizontal size of the element
      height - vertical size of the element
      Returns:
      this builder
      Since:
      0.1.0
    • build

      @Contract("-> new") public DialogBody.Item build()
      Returns the built body element.
      Returns:
      the built body element
      Since:
      0.1.0