Record Class Statistic
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.data.statistic.Statistic
- Record Components:
type- The broad categorization type of the statistic.target- The specific target identifier within that category.
Represents a unique trackable statistic associated with a player.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStatistic(StatisticType type, net.kyori.adventure.key.Key target) Creates an instance of aStatisticrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.kyori.adventure.key.Keytarget()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
CODEC
A structured codec for encoding and decoding a Statistic to and from a string format. The serialized format is expected to be "type_id/target_id".
-
-
Constructor Details
-
Method Details
-
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). -
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. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
target
public net.kyori.adventure.key.Key target()Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-