Package dev.crafty.core.actions.config
Record Class ActionContext
java.lang.Object
java.lang.Record
dev.crafty.core.actions.config.ActionContext
public record ActionContext(org.bukkit.entity.Player player, List<ConfigValue<?>> configValues)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionActionContext(org.bukkit.entity.Player player, List<ConfigValue<?>> configValues) Creates an instance of aActionContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionList<ConfigValue<?>> Returns the value of theconfigValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.<T> TgetConfigValue(String path) 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
-
ActionContext
Creates an instance of aActionContextrecord class.- Parameters:
player- the value for theplayerrecord componentconfigValues- the value for theconfigValuesrecord component
-
-
Method Details
-
getConfigValue
-
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
-
configValues
Returns the value of theconfigValuesrecord component.- Returns:
- the value of the
configValuesrecord component
-