Record Class ServerStatus.Players
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.status.ServerStatus.Players
- Enclosing class:
- ServerStatus
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ServerStatus.Players>private final intThe field for themaxrecord component.private final intThe field for theonlinerecord component.private static final com.mojang.serialization.Codec<com.mojang.authlib.GameProfile>private final List<com.mojang.authlib.GameProfile>The field for thesamplerecord component.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmax()Returns the value of themaxrecord component.intonline()Returns the value of theonlinerecord component.List<com.mojang.authlib.GameProfile>sample()Returns the value of thesamplerecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
maxprivate final int maxThe field for themaxrecord component.
- 
onlineprivate final int onlineThe field for theonlinerecord component.
- 
sampleThe field for thesamplerecord component.
- 
PROFILE_CODECprivate static final com.mojang.serialization.Codec<com.mojang.authlib.GameProfile> PROFILE_CODEC
- 
CODEC
 
- 
- 
Constructor Details- 
PlayersCreates an instance of aPlayersrecord class.- Parameters:
- max- the value for the- maxrecord component
- online- the value for the- onlinerecord component
- sample- the value for the- samplerecord component
 
 
- 
- 
Method Details- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
maxpublic int max()Returns the value of themaxrecord component.- Returns:
- the value of the maxrecord component
 
- 
onlinepublic int online()Returns the value of theonlinerecord component.- Returns:
- the value of the onlinerecord component
 
- 
sampleReturns the value of thesamplerecord component.- Returns:
- the value of the samplerecord component
 
 
-