Package net.minestom.server.dialog
Record Class DialogInput.Text
java.lang.Object
java.lang.Record
net.minestom.server.dialog.DialogInput.Text
- All Implemented Interfaces:
DialogInput
- Enclosing interface:
DialogInput
public static record DialogInput.Text(@NotNull String key, int width, @NotNull Component label, boolean labelVisible, @NotNull String initial, int maxLength, @Nullable DialogInput.Text.Multiline multiline)
extends Record
implements DialogInput
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minestom.server.dialog.DialogInput
DialogInput.Boolean, DialogInput.NumberRange, DialogInput.SingleOption, DialogInput.Text -
Field Summary
FieldsFields inherited from interface net.minestom.server.dialog.DialogInput
DEFAULT_WIDTH, REGISTRY -
Constructor Summary
ConstructorsConstructorDescriptionText(@NotNull String key, int width, @NotNull Component label, boolean labelVisible, @NotNull String initial, int maxLength, @Nullable DialogInput.Text.Multiline multiline) Creates an instance of aTextrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StructCodec<? extends DialogInput> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringinitial()Returns the value of theinitialrecord component.@NotNull Stringkey()Returns the value of thekeyrecord component.@NotNull Componentlabel()Returns the value of thelabelrecord component.booleanReturns the value of thelabelVisiblerecord component.intReturns the value of themaxLengthrecord component.@Nullable DialogInput.Text.MultilineReturns the value of themultilinerecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Text
public Text(@NotNull @NotNull String key, int width, @NotNull @NotNull Component label, boolean labelVisible, @NotNull @NotNull String initial, int maxLength, @Nullable @Nullable DialogInput.Text.Multiline multiline) Creates an instance of aTextrecord class.- Parameters:
key- the value for thekeyrecord componentwidth- the value for thewidthrecord componentlabel- the value for thelabelrecord componentlabelVisible- the value for thelabelVisiblerecord componentinitial- the value for theinitialrecord componentmaxLength- the value for themaxLengthrecord componentmultiline- the value for themultilinerecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceDialogInput
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
labelVisible
public boolean labelVisible()Returns the value of thelabelVisiblerecord component.- Returns:
- the value of the
labelVisiblerecord component
-
initial
Returns the value of theinitialrecord component.- Returns:
- the value of the
initialrecord component
-
maxLength
public int maxLength()Returns the value of themaxLengthrecord component.- Returns:
- the value of the
maxLengthrecord component
-
multiline
Returns the value of themultilinerecord component.- Returns:
- the value of the
multilinerecord component
-