Record Class ServerStateService.ServerState
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.methods.ServerStateService.ServerState
- Enclosing class:
ServerStateService
public static record ServerStateService.ServerState(boolean started, List<PlayerDto> players, ServerStatus.Version version)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ServerStateService.ServerState> static final ServerStateService.ServerStateThe field for theplayersrecord component.private final booleanThe field for thestartedrecord component.private final ServerStatus.VersionThe field for theversionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionServerState(boolean started, List<PlayerDto> players, ServerStatus.Version version) Creates an instance of aServerStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.players()Returns the value of theplayersrecord component.booleanstarted()Returns the value of thestartedrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Field Details
-
started
private final boolean startedThe field for thestartedrecord component. -
players
-
version
The field for theversionrecord component. -
CODEC
-
NOT_STARTED
-
-
Constructor Details
-
ServerState
Creates an instance of aServerStaterecord class.- Parameters:
started- the value for thestartedrecord componentplayers- the value for theplayersrecord componentversion- the value for theversionrecord 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. -
started
public boolean started()Returns the value of thestartedrecord component.- Returns:
- the value of the
startedrecord component
-
players
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-