Package net.minecraft.client.network
Class ServerInfo
java.lang.Object
net.minecraft.client.network.ServerInfo
The information of a server entry in the list of servers available in
the multiplayer screen, or that of the servers connected directly.
The information for directly-connected servers are also saved (although
hidden from the multiplayer screen) so that chat preview acknowledgements
and other settings are saved. The list of these servers is stored in the
servers.dat file within the client game directory.- See Also:
- Mappings:
Namespace Name intermediary net/minecraft/class_642official fesnamed net/minecraft/client/network/ServerInfo
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe policy of the client when this server sends a server resource pack. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @org.jetbrains.annotations.Nullable byte[]private booleanprivate static final Loggerbooleanlongintprivate ServerInfo.ResourcePackPolicyprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(ServerInfo serverInfo) voidcopyWithSettingsFrom(ServerInfo serverInfo) static ServerInfofromNbt(NbtCompound root) @org.jetbrains.annotations.Nullable byte[]Returns the policy on resource packs sent by this server.booleanisLocal()booleanvoidsetFavicon(@org.jetbrains.annotations.Nullable byte[] favicon) voidsetResourcePackPolicy(ServerInfo.ResourcePackPolicy resourcePackPolicy) Sets the resource pack policy on this server.voidsetSecureChatEnforced(boolean secureChatEnforced) toNbt()
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector intermediary field_42889Lnet/minecraft/class_642;field_42889:Lorg/slf4j/Logger;official kLfes;k:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/client/network/ServerInfo;LOGGER:Lorg/slf4j/Logger;
-
name
- Mappings:
Namespace Name Mixin selector intermediary field_3752Lnet/minecraft/class_642;field_3752:Ljava/lang/String;official aLfes;a:Ljava/lang/String;named nameLnet/minecraft/client/network/ServerInfo;name:Ljava/lang/String;
-
address
- Mappings:
Namespace Name Mixin selector intermediary field_3761Lnet/minecraft/class_642;field_3761:Ljava/lang/String;official bLfes;b:Ljava/lang/String;named addressLnet/minecraft/client/network/ServerInfo;address:Ljava/lang/String;
-
playerCountLabel
- Mappings:
Namespace Name Mixin selector intermediary field_3753Lnet/minecraft/class_642;field_3753:Lnet/minecraft/class_2561;official cLfes;c:Lsw;named playerCountLabelLnet/minecraft/client/network/ServerInfo;playerCountLabel:Lnet/minecraft/text/Text;
-
label
- Mappings:
Namespace Name Mixin selector intermediary field_3757Lnet/minecraft/class_642;field_3757:Lnet/minecraft/class_2561;official dLfes;d:Lsw;named labelLnet/minecraft/client/network/ServerInfo;label:Lnet/minecraft/text/Text;
-
players
- Mappings:
Namespace Name Mixin selector intermediary field_41861Lnet/minecraft/class_642;field_41861:Lnet/minecraft/class_2926$class_2927;official eLfes;e:Labt$b;named playersLnet/minecraft/client/network/ServerInfo;players:Lnet/minecraft/server/ServerMetadata$Players;
-
ping
public long ping- Mappings:
Namespace Name Mixin selector intermediary field_3758Lnet/minecraft/class_642;field_3758:Jofficial fLfes;f:Jnamed pingLnet/minecraft/client/network/ServerInfo;ping:J
-
protocolVersion
public int protocolVersion- Mappings:
Namespace Name Mixin selector intermediary field_3756Lnet/minecraft/class_642;field_3756:Iofficial gLfes;g:Inamed protocolVersionLnet/minecraft/client/network/ServerInfo;protocolVersion:I
-
version
- Mappings:
Namespace Name Mixin selector intermediary field_3760Lnet/minecraft/class_642;field_3760:Lnet/minecraft/class_2561;official hLfes;h:Lsw;named versionLnet/minecraft/client/network/ServerInfo;version:Lnet/minecraft/text/Text;
-
online
public boolean online- Mappings:
Namespace Name Mixin selector intermediary field_3754Lnet/minecraft/class_642;field_3754:Zofficial iLfes;i:Znamed onlineLnet/minecraft/client/network/ServerInfo;online:Z
-
playerListSummary
- Mappings:
Namespace Name Mixin selector intermediary field_3762Lnet/minecraft/class_642;field_3762:Ljava/util/List;official jLfes;j:Ljava/util/List;named playerListSummaryLnet/minecraft/client/network/ServerInfo;playerListSummary:Ljava/util/List;
-
resourcePackPolicy
- Mappings:
Namespace Name Mixin selector intermediary field_3755Lnet/minecraft/class_642;field_3755:Lnet/minecraft/class_642$class_643;official lLfes;l:Lfes$a;named resourcePackPolicyLnet/minecraft/client/network/ServerInfo;resourcePackPolicy:Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;
-
favicon
- Mappings:
Namespace Name Mixin selector intermediary field_42890Lnet/minecraft/class_642;field_42890:[Bofficial mLfes;m:[Bnamed faviconLnet/minecraft/client/network/ServerInfo;favicon:[B
-
local
private boolean local- Mappings:
Namespace Name Mixin selector intermediary field_3763Lnet/minecraft/class_642;field_3763:Zofficial nLfes;n:Znamed localLnet/minecraft/client/network/ServerInfo;local:Z
-
secureChatEnforced
private boolean secureChatEnforced- Mappings:
Namespace Name Mixin selector intermediary field_39918Lnet/minecraft/class_642;field_39918:Zofficial oLfes;o:Znamed secureChatEnforcedLnet/minecraft/client/network/ServerInfo;secureChatEnforced:Z
-
-
Constructor Details
-
ServerInfo
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_642;<init>(Ljava/lang/String;Ljava/lang/String;Z)Vofficial <init>Lfes;<init>(Ljava/lang/String;Ljava/lang/String;Z)Vnamed <init>Lnet/minecraft/client/network/ServerInfo;<init>(Ljava/lang/String;Ljava/lang/String;Z)V
-
-
Method Details
-
toNbt
- Mappings:
Namespace Name Mixin selector intermediary method_2992Lnet/minecraft/class_642;method_2992()Lnet/minecraft/class_2487;official aLfes;a()Lqr;named toNbtLnet/minecraft/client/network/ServerInfo;toNbt()Lnet/minecraft/nbt/NbtCompound;
-
getResourcePackPolicy
Returns the policy on resource packs sent by this server.- Returns:
- the policy on resource packs sent by this server
- Mappings:
Namespace Name Mixin selector intermediary method_2990Lnet/minecraft/class_642;method_2990()Lnet/minecraft/class_642$class_643;official bLfes;b()Lfes$a;named getResourcePackPolicyLnet/minecraft/client/network/ServerInfo;getResourcePackPolicy()Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;
-
setResourcePackPolicy
Sets the resource pack policy on this server.This is called when a user has responded to the prompt on whether to accept server resource packs from this server in the future.
- Mappings:
Namespace Name Mixin selector intermediary method_2995Lnet/minecraft/class_642;method_2995(Lnet/minecraft/class_642$class_643;)Vofficial aLfes;a(Lfes$a;)Vnamed setResourcePackPolicyLnet/minecraft/client/network/ServerInfo;setResourcePackPolicy(Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;)V
-
fromNbt
- Mappings:
Namespace Name Mixin selector intermediary method_2993Lnet/minecraft/class_642;method_2993(Lnet/minecraft/class_2487;)Lnet/minecraft/class_642;official aLfes;a(Lqr;)Lfes;named fromNbtLnet/minecraft/client/network/ServerInfo;fromNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/client/network/ServerInfo;
-
getFavicon
- Mappings:
Namespace Name Mixin selector intermediary method_49306Lnet/minecraft/class_642;method_49306()[Bofficial cLfes;c()[Bnamed getFaviconLnet/minecraft/client/network/ServerInfo;getFavicon()[B
-
setFavicon
- Mappings:
Namespace Name Mixin selector intermediary method_49305Lnet/minecraft/class_642;method_49305([B)Vofficial aLfes;a([B)Vnamed setFaviconLnet/minecraft/client/network/ServerInfo;setFavicon([B)V
-
isLocal
public boolean isLocal()- Mappings:
Namespace Name Mixin selector intermediary method_2994Lnet/minecraft/class_642;method_2994()Zofficial dLfes;d()Znamed isLocalLnet/minecraft/client/network/ServerInfo;isLocal()Z
-
setSecureChatEnforced
public void setSecureChatEnforced(boolean secureChatEnforced) - Mappings:
Namespace Name Mixin selector intermediary method_45055Lnet/minecraft/class_642;method_45055(Z)Vofficial aLfes;a(Z)Vnamed setSecureChatEnforcedLnet/minecraft/client/network/ServerInfo;setSecureChatEnforced(Z)V
-
isSecureChatEnforced
public boolean isSecureChatEnforced()- Mappings:
Namespace Name Mixin selector intermediary method_45056Lnet/minecraft/class_642;method_45056()Zofficial eLfes;e()Znamed isSecureChatEnforcedLnet/minecraft/client/network/ServerInfo;isSecureChatEnforced()Z
-
copyFrom
- Mappings:
Namespace Name Mixin selector intermediary method_44292Lnet/minecraft/class_642;method_44292(Lnet/minecraft/class_642;)Vofficial aLfes;a(Lfes;)Vnamed copyFromLnet/minecraft/client/network/ServerInfo;copyFrom(Lnet/minecraft/client/network/ServerInfo;)V
-
copyWithSettingsFrom
- Mappings:
Namespace Name Mixin selector intermediary method_2996Lnet/minecraft/class_642;method_2996(Lnet/minecraft/class_642;)Vofficial bLfes;b(Lfes;)Vnamed copyWithSettingsFromLnet/minecraft/client/network/ServerInfo;copyWithSettingsFrom(Lnet/minecraft/client/network/ServerInfo;)V
-