Package dev.mintychochip.mint
Record Class TransactionContext.PlayerActor
java.lang.Object
java.lang.Record
dev.mintychochip.mint.TransactionContext.PlayerActor
- Record Components:
player- the Bukkit player who initiated the transaction
- All Implemented Interfaces:
TransactionContext.Actor
- Enclosing interface:
TransactionContext
public static record TransactionContext.PlayerActor(org.bukkit.entity.Player player)
extends Record
implements TransactionContext.Actor
Actor implementation for player-initiated transactions.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.mintychochip.mint.TransactionContext.Actor
TransactionContext.Actor.Type -
Constructor Summary
ConstructorsConstructorDescriptionPlayerActor(org.bukkit.entity.Player player) Creates an instance of aPlayerActorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getName()Returns the display name of this actor.getType()Returns the classification of this actor.final inthashCode()Returns a hash code value for this object.org.bukkit.entity.Playerplayer()Returns the value of theplayerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlayerActor
public PlayerActor(org.bukkit.entity.Player player) Creates an instance of aPlayerActorrecord class.- Parameters:
player- the value for theplayerrecord component
-
-
Method Details
-
getType
Description copied from interface:TransactionContext.ActorReturns the classification of this actor.- Specified by:
getTypein interfaceTransactionContext.Actor- Returns:
- actor type
-
getName
Description copied from interface:TransactionContext.ActorReturns the display name of this actor.- Specified by:
getNamein interfaceTransactionContext.Actor- Returns:
- actor name
-
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). -
player
public org.bukkit.entity.Player player()Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-