minecraft.wiki-mirror/wiki_backup/servers.dat.txt
2024-12-24 10:56:43 -05:00

42 lines
2.3 KiB
Text

{{exclusive|java}}
{{lowercase title}}
The '''servers.dat''' is used to store information regarding the [[multiplayer]] [[servers]] that the player has added to their [[server list]]. It does not store the direct connect IP address (see [[options.txt]]), nor any LAN server information<!-- Where is LAN server information stored? Add a link to it. -->. It is stored as an uncompressed [[NBT Format|NBT]] file. It is possible to add color codes by editing the server name attribute with an [[NBT Format|NBT Editor]] through the use of [[formatting codes]].
The file is located in the root of the directory specified in the [[launcher]] profile. By default, this would be ''[[.minecraft]]\servers.dat''.
== NBT Structure ==
<div class="treeview">
* {{nbt|compound}} The root tag.
** {{nbt|list|servers}}: List of compound tags, one for each saved server.
*** {{nbt|compound}} Information about the server.
**** {{nbt|string|icon}}: Base64-encoded PNG data of the server icon.
**** {{nbt|string|ip}}: The IP address of the server.
**** {{nbt|string|name}}: The name of the server as defined by the player.
**** {{nbt|byte|acceptTextures}}: 1 or 0 (true/false) - 0 if the player has selected ''Never'' when prompted to install a server [[resource pack]].
</div>
== History ==
{{HistoryTable
|{{HistoryLine|java beta}}
|{{HistoryLine||1.8|dev=Pre-release|Added <samp>server.dat</samp>, include tag <code>ip</code> and <code>name</code>, for saving server address and its name.}}
|{{HistoryLine|java}}
|{{HistoryLine||1.4.2|dev=12w42a|Added <code>hideAddress</code> tag, for the client shows the address or not in the server list.}}
|{{HistoryLine||1.7.2|dev=13w41a|Added <code>icon</code> tag, for saving server icon cache.}}
|{{HistoryLine||1.7.6|dev=pre1|Added <code>acceptTextures</code> tag, for the client to select a default action to a server resource pack.
|Removed <code>hideAddress</code> tag.}}
|{{HistoryLine||1.8|dev=14w17a|Added <code>acceptTextures</code> tag, for the client to select a default action to a server resource pack.
|Removed <code>hideAddress</code> tag.}}
}}
== Navigation ==
{{Navbox Java Edition technical|general}}
[[Category:Development]]
[[de:Servers Format]]
[[fr:Format servers.dat]]
[[ja:servers.datフォーマット]]
[[nl:Servers.dat formaat]]
[[pt:Formato servers.dat]]
[[zh:Servers.dat格式]]