Interface DialogBody
- All Known Implementing Classes:
DialogBody.Item, DialogBody.PlainMessage
A single element of a dialog body, that is the contents shown between the title and the
inputs or the action buttons.
- Since:
- 0.1.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordAn item, rendered as if it were sitting in an inventory slot.static final recordA multiline label. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault width of a body element.static final intLargest width the client accepts for a body element. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic DialogBody.Item.BuilderStarts building an item body element.static DialogBody.PlainMessagemessage(ComponentLike contents) Creates a multiline label of the default width.static DialogBody.PlainMessagemessage(ComponentLike contents, int width) Creates a multiline label.
-
Field Details
-
MAX_WIDTH
static final int MAX_WIDTHLargest width the client accepts for a body element.- Since:
- 0.1.0
- See Also:
-
DEFAULT_WIDTH
static final int DEFAULT_WIDTHDefault width of a body element.- Since:
- 0.1.0
- See Also:
-
-
Method Details
-
message
Creates a multiline label of the default width.- Parameters:
contents- the text to display- Returns:
- the body element
- Since:
- 0.1.0
-
message
Creates a multiline label.- Parameters:
contents- the text to displaywidth- the maximum width of the message, between 1 and 1024- Returns:
- the body element
- Since:
- 0.1.0
-
item
Starts building an item body element.- Parameters:
item- the stack to display- Returns:
- a fresh builder
- Since:
- 0.1.0
-