Record Class StatisticsPacket.Statistic
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.StatisticsPacket.Statistic
- Enclosing class:
StatisticsPacket
public static record StatisticsPacket.Statistic(StatisticCategory category, int statisticId, int value)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStatistic(StatisticCategory category, int statisticId, int value) Creates an instance of aStatisticrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thestatisticIdrecord component.final StringtoString()Returns a string representation of this record class.intvalue()Returns the value of thevaluerecord component.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
Statistic
Creates an instance of aStatisticrecord class.- Parameters:
category- the value for thecategoryrecord componentstatisticId- the value for thestatisticIdrecord componentvalue- the value for thevaluerecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
statisticId
public int statisticId()Returns the value of thestatisticIdrecord component.- Returns:
- the value of the
statisticIdrecord component
-
value
public int value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-