Record Class NoticeDialog
java.lang.Object
java.lang.Record
fr.fidorial.dialog.NoticeDialog
- Record Components:
base- the shared title, contents and behaviouraction- the only button of the dialog
- All Implemented Interfaces:
Dialog, DialogDefinition, DialogLike
public record NoticeDialog(DialogBase base, DialogActionButton action)
extends Record
implements DialogDefinition
A dialog with a single button in its footer.
- Since:
- 0.1.0
- Since Minecraft:
- 1.21.6
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DialogActionButtonThe button vanilla falls back to: a plaingui.okthat only dismisses the dialog. -
Constructor Summary
ConstructorsConstructorDescriptionNoticeDialog(DialogBase base, DialogActionButton action) Creates an instance of aNoticeDialogrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.base()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static NoticeDialogof(DialogBase base) Creates a notice whose button readsgui.okand only dismisses the dialog.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_ACTION
The button vanilla falls back to: a plaingui.okthat only dismisses the dialog.- Since:
- 0.1.0
-
-
Constructor Details
-
Method Details
-
of
Creates a notice whose button readsgui.okand only dismisses the dialog.- Parameters:
base- the shared title, contents and behaviour- Returns:
- the dialog
- Since:
- 0.1.0
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
base
Returns the value of thebaserecord component.- Specified by:
basein interfaceDialogDefinition- Returns:
- the value of the
baserecord component
-
action
-