Package net.minecraft.server
Record Class ServerMetadata
java.lang.Object
java.lang.Record
net.minecraft.server.ServerMetadata
- Record Components:
description
-players
-version
-favicon
-secureChatEnforced
-
public record ServerMetadata(Text description, Optional<ServerMetadata.Players> players, Optional<ServerMetadata.Version> version, Optional<ServerMetadata.Favicon> favicon, boolean secureChatEnforced)
extends Record
Represents metadata sent to the client. This describes the server's message of the day, online players and the protocol version.
- Mappings:
Namespace Name named net/minecraft/server/ServerMetadata
intermediary net/minecraft/class_2926
official ajp
named description
intermediary comp_1273
official b
named players
intermediary comp_1274
official c
named version
intermediary comp_1275
official d
named favicon
intermediary comp_1276
official e
named secureChatEnforced
intermediary comp_1277
official f
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static final record
static final record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<ServerMetadata> private final Text
The field for thedescription
record component.private final Optional
<ServerMetadata.Favicon> The field for thefavicon
record component.private final Optional
<ServerMetadata.Players> The field for theplayers
record component.private final boolean
The field for thesecureChatEnforced
record component.private final Optional
<ServerMetadata.Version> The field for theversion
record component. -
Constructor Summary
ConstructorDescriptionServerMetadata
(Text text, Optional<ServerMetadata.Players> optional, Optional<ServerMetadata.Version> optional2, Optional<ServerMetadata.Favicon> optional3, boolean bool) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.favicon()
Returns the value of thefavicon
record component.final int
hashCode()
Returns a hash code value for this object.players()
Returns the value of theplayers
record component.boolean
Returns the value of thesecureChatEnforced
record component.final String
toString()
Returns a string representation of this record class.version()
Returns the value of theversion
record component.
-
Field Details
-
description
The field for thedescription
record component. -
players
The field for theplayers
record component. -
version
The field for theversion
record component. -
favicon
The field for thefavicon
record component. -
secureChatEnforced
private final boolean secureChatEnforcedThe field for thesecureChatEnforced
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/server/ServerMetadata;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_42535
Lnet/minecraft/class_2926;field_42535:Lcom/mojang/serialization/Codec;
official a
Lajp;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
ServerMetadata
public ServerMetadata(Text text, Optional<ServerMetadata.Players> optional, Optional<ServerMetadata.Version> optional2, Optional<ServerMetadata.Favicon> optional3, boolean bool)
-
-
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 '=='. -
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-
players
Returns the value of theplayers
record component.- Returns:
- the value of the
players
record component
-
version
Returns the value of theversion
record component.- Returns:
- the value of the
version
record component
-
favicon
Returns the value of thefavicon
record component.- Returns:
- the value of the
favicon
record component
-
secureChatEnforced
public boolean secureChatEnforced()Returns the value of thesecureChatEnforced
record component.- Returns:
- the value of the
secureChatEnforced
record component
-