Class PEItemBody
java.lang.Object
io.github.projectunified.unidialog.packetevents.body.PEItemBody
- All Implemented Interfaces:
ItemBody<com.github.retrooper.packetevents.protocol.item.ItemStack,
,PETextBody, PEItemBody> PEDialogBody
public class PEItemBody
extends Object
implements ItemBody<com.github.retrooper.packetevents.protocol.item.ItemStack,PETextBody,PEItemBody>, PEDialogBody
-
Field Summary
Fields inherited from interface io.github.projectunified.unidialog.core.body.ItemBody
DEFAULT_HEIGHT, DEFAULT_WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionPEItemBody
(Function<String, net.kyori.adventure.text.Component> componentDeserializer) -
Method Summary
Modifier and TypeMethodDescriptiondescription
(@Nullable Consumer<PETextBody> descriptionBuilder) Set the description for the bodycom.github.retrooper.packetevents.protocol.dialog.body.DialogBody
height
(int height) Set the height of the item bodyitem
(com.github.retrooper.packetevents.protocol.item.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
-
PEItemBody
-
-
Method Details
-
item
Description copied from interface:ItemBody
Set the item for the body- Specified by:
item
in interfaceItemBody<com.github.retrooper.packetevents.protocol.item.ItemStack,
PETextBody, PEItemBody> - 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<com.github.retrooper.packetevents.protocol.item.ItemStack,
PETextBody, PEItemBody> - 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<com.github.retrooper.packetevents.protocol.item.ItemStack,
PETextBody, PEItemBody> - 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<com.github.retrooper.packetevents.protocol.item.ItemStack,
PETextBody, PEItemBody> - 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<com.github.retrooper.packetevents.protocol.item.ItemStack,
PETextBody, PEItemBody> - 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<com.github.retrooper.packetevents.protocol.item.ItemStack,
PETextBody, PEItemBody> - Parameters:
height
- the height to set- Returns:
- the instance of the item body for method chaining
-
getDialogBody
public com.github.retrooper.packetevents.protocol.dialog.body.DialogBody getDialogBody()- Specified by:
getDialogBody
in interfacePEDialogBody
-