Package net.minecraft.client.option
Class ServerList
java.lang.Object
net.minecraft.client.option.ServerList
A list of 
ServerInfo. The list can contain an unlimited amount of
 server entries that are displayed on the multiplayer screen,
 and up to 16 entries of servers
 that are created when using "Direct Connection" and is hidden from the screen.- Mappings:
- Namespace - Name - official - ffe- intermediary - net/minecraft/class_641- named - net/minecraft/client/option/ServerList
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final MinecraftClientprivate final List<ServerInfo>private static final TaskExecutor<Runnable>private static final Loggerprivate static final intprivate final List<ServerInfo>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidadd(ServerInfo serverInfo, boolean hidden) Adds a server info to this list.get(int index) Returns the server info foraddress, ornullif there is no such one.voidloadFile()voidremove(ServerInfo serverInfo) private static booleanreplace(ServerInfo serverInfo, List<ServerInfo> serverInfos) Replaces the server info inserverInfoswhose name and address matchserverInfo's withserverInfo.voidsaveFile()voidset(int index, ServerInfo serverInfo) intsize()voidswapEntries(int index1, int index2) Returns the previously hidden server info for the addressaddress, ornullif there is no such info.static voidupdateServerListEntry(ServerInfo serverInfo) 
- 
Field Details- 
LOGGER- Mappings:
- Namespace - Name - Mixin selector - official - a- Lffe;a:Lorg/slf4j/Logger;- intermediary - field_3751- Lnet/minecraft/class_641;field_3751:Lorg/slf4j/Logger;- named - LOGGER- Lnet/minecraft/client/option/ServerList;LOGGER:Lorg/slf4j/Logger;
 
- 
IO_EXECUTOR- Mappings:
- Namespace - Name - Mixin selector - official - b- Lffe;b:Lbcq;- intermediary - field_39360- Lnet/minecraft/class_641;field_39360:Lnet/minecraft/class_3846;- named - IO_EXECUTOR- Lnet/minecraft/client/option/ServerList;IO_EXECUTOR:Lnet/minecraft/util/thread/TaskExecutor;
 
- 
MAX_HIDDEN_ENTRIESprivate static final int MAX_HIDDEN_ENTRIES- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lffe;c:I- intermediary - field_39437- Lnet/minecraft/class_641;field_39437:I- named - MAX_HIDDEN_ENTRIES- Lnet/minecraft/client/option/ServerList;MAX_HIDDEN_ENTRIES:I
 
- 
client- Mappings:
- Namespace - Name - Mixin selector - official - d- Lffe;d:Lenn;- intermediary - field_3750- Lnet/minecraft/class_641;field_3750:Lnet/minecraft/class_310;- named - client- Lnet/minecraft/client/option/ServerList;client:Lnet/minecraft/client/MinecraftClient;
 
- 
servers- Mappings:
- Namespace - Name - Mixin selector - official - e- Lffe;e:Ljava/util/List;- intermediary - field_3749- Lnet/minecraft/class_641;field_3749:Ljava/util/List;- named - servers- Lnet/minecraft/client/option/ServerList;servers:Ljava/util/List;
 
 
- 
- 
Constructor Details- 
ServerList- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lffe;<init>(Lenn;)V- intermediary - <init>- Lnet/minecraft/class_641;<init>(Lnet/minecraft/class_310;)V- named - <init>- Lnet/minecraft/client/option/ServerList;<init>(Lnet/minecraft/client/MinecraftClient;)V
 
 
- 
- 
Method Details- 
loadFilepublic void loadFile()- Mappings:
- Namespace - Name - Mixin selector - official - a- Lffe;a()V- intermediary - method_2981- Lnet/minecraft/class_641;method_2981()V- named - loadFile- Lnet/minecraft/client/option/ServerList;loadFile()V
 
- 
saveFilepublic void saveFile()- Mappings:
- Namespace - Name - Mixin selector - official - b- Lffe;b()V- intermediary - method_2987- Lnet/minecraft/class_641;method_2987()V- named - saveFile- Lnet/minecraft/client/option/ServerList;saveFile()V
 
- 
get- Mappings:
- Namespace - Name - Mixin selector - official - a- Lffe;a(I)Lffd;- intermediary - method_2982- Lnet/minecraft/class_641;method_2982(I)Lnet/minecraft/class_642;- named - get- Lnet/minecraft/client/option/ServerList;get(I)Lnet/minecraft/client/network/ServerInfo;
 
- 
getReturns the server info foraddress, ornullif there is no such one.- Returns:
- the server info for address, ornullif there is no such one
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lffe;a(Ljava/lang/String;)Lffd;- intermediary - method_44295- Lnet/minecraft/class_641;method_44295(Ljava/lang/String;)Lnet/minecraft/class_642;- named - get- Lnet/minecraft/client/option/ServerList;get(Ljava/lang/String;)Lnet/minecraft/client/network/ServerInfo;
 
- 
tryUnhideReturns the previously hidden server info for the addressaddress, ornullif there is no such info.This "unhides" the server info and is used when adding the entry to the multiplayer screen to unhide any existing server info created when connecting directly. - Returns:
- the previously hidden server info for the address address, ornullif there is no such info
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lffe;b(Ljava/lang/String;)Lffd;- intermediary - method_44296- Lnet/minecraft/class_641;method_44296(Ljava/lang/String;)Lnet/minecraft/class_642;- named - tryUnhide- Lnet/minecraft/client/option/ServerList;tryUnhide(Ljava/lang/String;)Lnet/minecraft/client/network/ServerInfo;
 
- 
remove- Mappings:
- Namespace - Name - Mixin selector - official - a- Lffe;a(Lffd;)V- intermediary - method_2983- Lnet/minecraft/class_641;method_2983(Lnet/minecraft/class_642;)V- named - remove- Lnet/minecraft/client/option/ServerList;remove(Lnet/minecraft/client/network/ServerInfo;)V
 
- 
addAdds a server info to this list.- Parameters:
- hidden- whether the info should not be listed in the multiplayer screen (also called "direct connection")
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lffe;a(Lffd;Z)V- intermediary - method_2988- Lnet/minecraft/class_641;method_2988(Lnet/minecraft/class_642;Z)V- named - add- Lnet/minecraft/client/option/ServerList;add(Lnet/minecraft/client/network/ServerInfo;Z)V
 
- 
sizepublic int size()- Mappings:
- Namespace - Name - Mixin selector - official - c- Lffe;c()I- intermediary - method_2984- Lnet/minecraft/class_641;method_2984()I- named - size- Lnet/minecraft/client/option/ServerList;size()I
 
- 
swapEntriespublic void swapEntries(int index1, int index2) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lffe;a(II)V- intermediary - method_2985- Lnet/minecraft/class_641;method_2985(II)V- named - swapEntries- Lnet/minecraft/client/option/ServerList;swapEntries(II)V
 
- 
set- Mappings:
- Namespace - Name - Mixin selector - official - a- Lffe;a(ILffd;)V- intermediary - method_2980- Lnet/minecraft/class_641;method_2980(ILnet/minecraft/class_642;)V- named - set- Lnet/minecraft/client/option/ServerList;set(ILnet/minecraft/client/network/ServerInfo;)V
 
- 
replaceReplaces the server info inserverInfoswhose name and address matchserverInfo's withserverInfo.- Mappings:
- Namespace - Name - Mixin selector - official - a- Lffe;a(Lffd;Ljava/util/List;)Z- intermediary - method_44294- Lnet/minecraft/class_641;method_44294(Lnet/minecraft/class_642;Ljava/util/List;)Z- named - replace- Lnet/minecraft/client/option/ServerList;replace(Lnet/minecraft/client/network/ServerInfo;Ljava/util/List;)Z
 
- 
updateServerListEntry- Mappings:
- Namespace - Name - Mixin selector - official - b- Lffe;b(Lffd;)V- intermediary - method_2986- Lnet/minecraft/class_641;method_2986(Lnet/minecraft/class_642;)V- named - updateServerListEntry- Lnet/minecraft/client/option/ServerList;updateServerListEntry(Lnet/minecraft/client/network/ServerInfo;)V
 
 
-