Record Class TabCompleteContext
java.lang.Object
java.lang.Record
com.marcusslover.plus.lib.command.TabCompleteContext
- All Implemented Interfaces:
ICommandContextHelper<TabCompleteContext>
public record TabCompleteContext(@NotNull Command commandData, @NotNull org.bukkit.command.CommandSender sender, @NotNull String label, @NotNull String alias, @NotNull String[] args)
extends Record
implements ICommandContextHelper<TabCompleteContext>
-
Constructor Summary
ConstructorsConstructorDescriptionTabCompleteContext(@NotNull Command commandData, @NotNull org.bukkit.command.CommandSender sender, @NotNull String label, @NotNull String alias, @NotNull String[] args) Creates an instance of aTabCompleteContextrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Stringalias()Returns the value of thealiasrecord component.@NotNull String[]args()Returns the value of theargsrecord component.@NotNull TabCompleteContext@NotNull TabCompleteContext@NotNull CommandReturns the value of thecommandDatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringlabel()Returns the value of thelabelrecord component.@NotNull org.bukkit.command.CommandSendersender()Returns the value of thesenderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TabCompleteContext
public TabCompleteContext(@NotNull @NotNull Command commandData, @NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String label, @NotNull @NotNull String alias, @NotNull @NotNull String[] args) Creates an instance of aTabCompleteContextrecord class.- Parameters:
commandData- the value for thecommandDatarecord componentsender- the value for thesenderrecord componentlabel- the value for thelabelrecord componentalias- the value for thealiasrecord componentargs- the value for theargsrecord component
-
-
Method Details
-
asPlayer
@NotNull public @NotNull TabCompleteContext asPlayer(@NotNull @NotNull Consumer<@NotNull org.bukkit.entity.Player> player) - Specified by:
asPlayerin interfaceICommandContextHelper<TabCompleteContext>
-
asConsole
@NotNull public @NotNull TabCompleteContext asConsole(@NotNull @NotNull Consumer<@NotNull org.bukkit.command.ConsoleCommandSender> console) - Specified by:
asConsolein interfaceICommandContextHelper<TabCompleteContext>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
commandData
Returns the value of thecommandDatarecord component.- Returns:
- the value of the
commandDatarecord component
-
sender
@NotNull public @NotNull org.bukkit.command.CommandSender sender()Returns the value of thesenderrecord component.- Returns:
- the value of the
senderrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
alias
Returns the value of thealiasrecord component.- Returns:
- the value of the
aliasrecord component
-
args
Returns the value of theargsrecord component.- Returns:
- the value of the
argsrecord component
-