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.DialogBodyheight(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:ItemBodySet the item for the body- Specified by:
itemin 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:ItemBodySet the description for the body- Specified by:
descriptionin 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:ItemBodySet the option to show decorations in the body- Specified by:
showDecorationsin 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:ItemBodySet the option to show a tooltip in the body- Specified by:
showTooltipin 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:ItemBodySet the width of the item body- Specified by:
widthin 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:ItemBodySet the height of the item body- Specified by:
heightin 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:
getDialogBodyin interfacePaperDialogBody
-