Interface DialogBody
- All Known Subinterfaces:
ItemDialogBody
,PlainMessageDialogBody
Represents the body of a dialog.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic ItemDialogBody.Builder
Creates a new item dialog body builder.static ItemDialogBody
item
(ItemStack item, @Nullable PlainMessageDialogBody description, boolean showDecorations, boolean showTooltip, int width, int height) Creates an item body for a dialog.static PlainMessageDialogBody
plainMessage
(Component contents) Creates a plain message body for a dialog.static PlainMessageDialogBody
plainMessage
(Component contents, @org.jetbrains.annotations.Range(from=1L, to=1024L) int width) Creates a plain message body for a dialog.
-
Method Details
-
item
@Contract(pure=true, value="_, _, _, _, _, _ -> new") static ItemDialogBody item(ItemStack item, @Nullable PlainMessageDialogBody description, boolean showDecorations, boolean showTooltip, int width, int height) Creates an item body for a dialog.- Parameters:
item
- the item to display in the dialogdescription
- the description of the body, or null if not setshowDecorations
- whether to show decorations around the itemshowTooltip
- whether to show a tooltip for the itemwidth
- the width of the item bodyheight
- the height of the item body- Returns:
- a new item body instance
-
item
Creates a new item dialog body builder.- Parameters:
item
- the item to display in the dialog- Returns:
- a new item dialog body builder instance
-
plainMessage
@Contract(pure=true, value="_, -> new") static PlainMessageDialogBody plainMessage(Component contents) Creates a plain message body for a dialog.- Parameters:
contents
- the contents of the message- Returns:
- a new plain message body instance
-
plainMessage
@Contract(pure=true, value="_, _ -> new") static PlainMessageDialogBody plainMessage(Component contents, @org.jetbrains.annotations.Range(from=1L, to=1024L) int width) Creates a plain message body for a dialog.- Parameters:
contents
- the contents of the messagewidth
- the width of the message body- Returns:
- a new plain message body instance
-