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 aActionContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionList
<ConfigValue<?>> Returns the value of theconfigValues
record component.final boolean
Indicates whether some other object is "equal to" this one.<T> T
getConfigValue
(String path) final int
hashCode()
Returns a hash code value for this object.org.bukkit.entity.Player
player()
Returns the value of theplayer
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ActionContext
Creates an instance of aActionContext
record class.- Parameters:
player
- the value for theplayer
record componentconfigValues
- the value for theconfigValues
record 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 theplayer
record component.- Returns:
- the value of the
player
record component
-
configValues
Returns the value of theconfigValues
record component.- Returns:
- the value of the
configValues
record component
-