Record Class NbtSuggestionComponent
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.client.command.suggest.nbt.NbtSuggestionComponent
- All Implemented Interfaces:
com.mojang.brigadier.Message
-
Constructor Summary
ConstructorsConstructorDescriptionNbtSuggestionComponent(String text) NbtSuggestionComponent(String text, int priority) Creates an instance of aNbtSuggestionComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intpriority()Returns the value of thepriorityrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NbtSuggestionComponent
-
NbtSuggestionComponent
Creates an instance of aNbtSuggestionComponentrecord class.- Parameters:
text- the value for thetextrecord componentpriority- the value for thepriorityrecord component
-
-
Method Details
-
getString
- Specified by:
getStringin interfacecom.mojang.brigadier.Message
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-