Package org.cloudburstmc.netty.signaling
Record Class ProviderClient.Health
java.lang.Object
java.lang.Record
org.cloudburstmc.netty.signaling.ProviderClient.Health
- Enclosing class:
- ProviderClient
public static record ProviderClient.Health(boolean acceptingPlayers, int capacity, String build, ProviderClient.PlayerCount playerCount)
extends Record
Capacity and playerCount describe the same observation. Public server status is independent.
-
Constructor Summary
ConstructorsConstructorDescriptionHealth(boolean healthy, boolean acceptingPlayers, int capacity, double load, String protocolVersion, String build) Deprecated, for removal: This API element is subject to removal in a future version.Health(boolean healthy, boolean acceptingPlayers, int capacity, double load, String protocolVersion, String build, ProviderClient.PlayerCount playerCount) Deprecated, for removal: This API element is subject to removal in a future version.Health(boolean acceptingPlayers, int capacity, String build, ProviderClient.PlayerCount playerCount) Creates an instance of aHealthrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theacceptingPlayersrecord component.build()Returns the value of thebuildrecord component.intcapacity()Returns the value of thecapacityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theplayerCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Health
public Health(boolean acceptingPlayers, int capacity, String build, ProviderClient.PlayerCount playerCount) Creates an instance of aHealthrecord class.- Parameters:
acceptingPlayers- the value for theacceptingPlayersrecord componentcapacity- the value for thecapacityrecord componentbuild- the value for thebuildrecord componentplayerCount- the value for theplayerCountrecord component
-
Health
@Deprecated(forRemoval=true) public Health(boolean healthy, boolean acceptingPlayers, int capacity, double load, String protocolVersion, String build, ProviderClient.PlayerCount playerCount) Deprecated, for removal: This API element is subject to removal in a future version.Temporary source adapter; obsolete load and protocol arguments are ignored. -
Health
@Deprecated(forRemoval=true) public Health(boolean healthy, boolean acceptingPlayers, int capacity, double load, String protocolVersion, String build) Deprecated, for removal: This API element is subject to removal in a future version.Temporary source adapter for hosts without actual player telemetry.
-
-
Method Details
-
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 '=='. -
acceptingPlayers
public boolean acceptingPlayers()Returns the value of theacceptingPlayersrecord component.- Returns:
- the value of the
acceptingPlayersrecord component
-
capacity
public int capacity()Returns the value of thecapacityrecord component.- Returns:
- the value of the
capacityrecord component
-
build
Returns the value of thebuildrecord component.- Returns:
- the value of the
buildrecord component
-
playerCount
Returns the value of theplayerCountrecord component.- Returns:
- the value of the
playerCountrecord component
-