Package dev.jorel.commandapi.executors
Record Class BukkitExecutionInfo<Sender>
java.lang.Object
java.lang.Record
dev.jorel.commandapi.executors.BukkitExecutionInfo<Sender>
- Type Parameters:
Sender- The type of the sender of a command this BukkitExecutionInfo belongs to
- All Implemented Interfaces:
ExecutionInfo<Sender,BukkitCommandSender<? extends Sender>>
public record BukkitExecutionInfo<Sender>(Sender sender, BukkitCommandSender<? extends Sender> senderWrapper, CommandArguments args)
extends Record
implements ExecutionInfo<Sender,BukkitCommandSender<? extends Sender>>
This record represents a BukkitExecutionInfo for a command. It provides the sender of a command, as well as it's arguments
-
Constructor Summary
ConstructorsConstructorDescriptionBukkitExecutionInfo(Sender sender, BukkitCommandSender<? extends Sender> senderWrapper, CommandArguments args) Creates an instance of aBukkitExecutionInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionargs()Returns the value of theargsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sender()Returns the value of thesenderrecord component.BukkitCommandSender<? extends Sender> Returns the value of thesenderWrapperrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BukkitExecutionInfo
public BukkitExecutionInfo(Sender sender, BukkitCommandSender<? extends Sender> senderWrapper, CommandArguments args) Creates an instance of aBukkitExecutionInforecord class.- Parameters:
sender- the value for thesenderrecord componentsenderWrapper- the value for thesenderWrapperrecord componentargs- the value for theargsrecord 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). -
sender
Returns the value of thesenderrecord component.- Specified by:
senderin interfaceExecutionInfo<Sender,BukkitCommandSender<? extends Sender>> - Returns:
- the value of the
senderrecord component
-
senderWrapper
Returns the value of thesenderWrapperrecord component.- Specified by:
senderWrapperin interfaceExecutionInfo<Sender,BukkitCommandSender<? extends Sender>> - Returns:
- the value of the
senderWrapperrecord component
-
args
Returns the value of theargsrecord component.- Specified by:
argsin interfaceExecutionInfo<Sender,BukkitCommandSender<? extends Sender>> - Returns:
- the value of the
argsrecord component
-