Class PaperItemBody
java.lang.Object
io.github.projectunified.unidialog.paper.body.PaperItemBody
- All Implemented Interfaces:
ItemBody<org.bukkit.inventory.ItemStack,
,PaperTextBody, PaperItemBody> PaperDialogBody
public class PaperItemBody
extends Object
implements ItemBody<org.bukkit.inventory.ItemStack,PaperTextBody,PaperItemBody>, PaperDialogBody
-
Field Summary
Fields inherited from interface io.github.projectunified.unidialog.core.body.ItemBody
DEFAULT_HEIGHT, DEFAULT_WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionPaperItemBody
(Function<String, net.kyori.adventure.text.Component> componentDeserializer) -
Method Summary
Modifier and TypeMethodDescriptiondescription
(@Nullable Consumer<PaperTextBody> descriptionBuilder) Set the description for the bodyio.papermc.paper.registry.data.dialog.body.DialogBody
height
(int height) Set the height of the item bodyitem
(org.bukkit.inventory.ItemStack item) Set 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
-
Constructor Details
-
PaperItemBody
-
-
Method Details
-
item
Description copied from interface:ItemBody
Set the item for the body- Specified by:
item
in interfaceItemBody<org.bukkit.inventory.ItemStack,
PaperTextBody, PaperItemBody> - Parameters:
item
- the item to set- Returns:
- the instance of the item body for method chaining
-
description
Description copied from interface:ItemBody
Set the description for the body- Specified by:
description
in interfaceItemBody<org.bukkit.inventory.ItemStack,
PaperTextBody, PaperItemBody> - Parameters:
descriptionBuilder
- a consumer to build the description- Returns:
- the instance of the item body for method chaining
-
showDecorations
Description copied from interface:ItemBody
Set the option to show decorations in the body- Specified by:
showDecorations
in interfaceItemBody<org.bukkit.inventory.ItemStack,
PaperTextBody, PaperItemBody> - Parameters:
showDecorations
- whether to show decorations- Returns:
- the instance of the item body for method chaining
-
showTooltip
Description copied from interface:ItemBody
Set the option to show a tooltip in the body- Specified by:
showTooltip
in interfaceItemBody<org.bukkit.inventory.ItemStack,
PaperTextBody, PaperItemBody> - Parameters:
showTooltip
- whether to show a tooltip- Returns:
- the instance of the item body for method chaining
-
width
Description copied from interface:ItemBody
Set the width of the item body- Specified by:
width
in interfaceItemBody<org.bukkit.inventory.ItemStack,
PaperTextBody, PaperItemBody> - Parameters:
width
- the width to set- Returns:
- the instance of the item body for method chaining
-
height
Description copied from interface:ItemBody
Set the height of the item body- Specified by:
height
in interfaceItemBody<org.bukkit.inventory.ItemStack,
PaperTextBody, PaperItemBody> - Parameters:
height
- the height to set- Returns:
- the instance of the item body for method chaining
-
getDialogBody
public io.papermc.paper.registry.data.dialog.body.DialogBody getDialogBody()- Specified by:
getDialogBody
in interfacePaperDialogBody
-