Class DialogBody.Item.Builder
java.lang.Object
fr.fidorial.dialog.DialogBody.Item.Builder
- Enclosing class:
DialogBody.Item
Fluent builder for
DialogBody.Item.- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the built body element.description(@Nullable DialogBody.PlainMessage description) description(ComponentLike description) showDecoration(boolean showDecoration) showTooltip(boolean showTooltip) size(int width, int height)
-
Method Details
-
item
- Parameters:
item- the stack to display- Returns:
- this builder
- Since:
- 0.1.0
-
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, ornullfor none- Returns:
- this builder
- Since:
- 0.1.0
-
showDecoration
- Parameters:
showDecoration- whether the stack count and damage bar are drawn over the item- Returns:
- this builder
- Since:
- 0.1.0
-
showTooltip
- Parameters:
showTooltip- whether hovering the item pops its tooltip up- Returns:
- this builder
- Since:
- 0.1.0
-
size
- Parameters:
width- horizontal size of the elementheight- vertical size of the element- Returns:
- this builder
- Since:
- 0.1.0
-
build
Returns the built body element.- Returns:
- the built body element
- Since:
- 0.1.0
-