Record Class StatisticsPacket.Statistic
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.StatisticsPacket.Statistic
- All Implemented Interfaces:
NetworkBuffer.Writer
- Enclosing class:
StatisticsPacket
public static record StatisticsPacket.Statistic(@NotNull StatisticCategory category, int statisticId, int value)
extends Record
implements NetworkBuffer.Writer
-
Constructor Summary
ConstructorsConstructorDescriptionStatistic(@NotNull NetworkBuffer reader) Statistic(@NotNull StatisticCategory category, int statisticId, int value) Creates an instance of aStatisticrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StatisticCategorycategory()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.voidwrite(@NotNull NetworkBuffer writer)
-
Constructor Details
-
Statistic
-
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
-
write
- Specified by:
writein interfaceNetworkBuffer.Writer
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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
-