Record Class CommandSuggestionEvent.CommandSuggestion
java.lang.Object
java.lang.Record
org.skriptlang.skript.bukkit.command.elements.structures.util.CommandSuggestionEvent.CommandSuggestion
- Record Components:
suggestion- The suggestion.tooltip- An optional tooltip to display when hovering over this suggestion.
- Enclosing class:
CommandSuggestionEvent
-
Constructor Summary
ConstructorsConstructorDescriptionCommandSuggestion(String suggestion) CommandSuggestion(String suggestion, @Nullable net.kyori.adventure.text.Component tooltip) Creates an instance of aCommandSuggestionrecord 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.Returns the value of thesuggestionrecord component.@Nullable net.kyori.adventure.text.Componenttooltip()Returns the value of thetooltiprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CommandSuggestion
-
CommandSuggestion
public CommandSuggestion(String suggestion, @Nullable @Nullable net.kyori.adventure.text.Component tooltip) Creates an instance of aCommandSuggestionrecord class.- Parameters:
suggestion- the value for thesuggestionrecord componenttooltip- the value for thetooltiprecord component
-
-
Method Details
-
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). -
suggestion
Returns the value of thesuggestionrecord component.- Returns:
- the value of the
suggestionrecord component
-
tooltip
-