Interface ItemBody<I,B extends TextBody<B>,T extends ItemBody<I,B,T>>
- Type Parameters:
I
- the type of item for the item bodyB
- the type of text body for the descriptionT
- 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 -
Method Summary
Modifier and TypeMethodDescriptiondescription
(@Nullable Consumer<B> descriptionBuilder) Set the description for the bodyheight
(int height) Set the height of the item bodySet the item for the bodyshowDecorations
(boolean showDecorations) Set the option to show decorations in the bodyshowTooltip
(boolean showTooltip) Set the option to show a tooltip in the bodywidth
(int width) Set the width of the item body
-
Field Details
-
DEFAULT_WIDTH
static final int DEFAULT_WIDTH- See Also:
-
DEFAULT_HEIGHT
static final int DEFAULT_HEIGHT- See Also:
-
-
Method Details
-
item
Set the item for the body- Parameters:
item
- the item to set- Returns:
- the instance of the item body for method chaining
-
description
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
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
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
Set the width of the item body- Parameters:
width
- the width to set- Returns:
- the instance of the item body for method chaining
-
height
Set the height of the item body- Parameters:
height
- the height to set- Returns:
- the instance of the item body for method chaining
-