Record Class ServerStateService.SystemMessage
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.methods.ServerStateService.SystemMessage
- Enclosing class:
ServerStateService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ServerStateService.SystemMessage> private final MessageThe field for themessagerecord component.private final booleanThe field for theoverlayrecord component.The field for thereceivingPlayersrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSystemMessage(Message message, boolean overlay, Optional<List<PlayerDto>> receivingPlayers) Creates an instance of aSystemMessagerecord 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.message()Returns the value of themessagerecord component.booleanoverlay()Returns the value of theoverlayrecord component.Returns the value of thereceivingPlayersrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
message
The field for themessagerecord component. -
overlay
private final boolean overlayThe field for theoverlayrecord component. -
receivingPlayers
The field for thereceivingPlayersrecord component. -
CODEC
-
-
Constructor Details
-
SystemMessage
Creates an instance of aSystemMessagerecord class.- Parameters:
message- the value for themessagerecord componentoverlay- the value for theoverlayrecord componentreceivingPlayers- the value for thereceivingPlayersrecord component
-
-
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 '=='. -
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
overlay
public boolean overlay()Returns the value of theoverlayrecord component.- Returns:
- the value of the
overlayrecord component
-
receivingPlayers
Returns the value of thereceivingPlayersrecord component.- Returns:
- the value of the
receivingPlayersrecord component
-