The heart of MCUpdater's functionality is the ServerPack.xml file (though it can be named whatever you want).
This file provides the information that MCUpdater needs to install and configure the user's Minecraft client to work with your server.
We link a functional example serverpack by default in all MCU builds as of late 2.2-dev. You can use this as a starting point for your own, or as more detailed reference than the example below.
A tool to generate the file is available here: http://files.mcupdater.com/MCU-FastPack-latest.jar. Documentation for this tool can be found here: https://gist.github.com/smbarbour/9422438. Otherwise, you can use your favorite XML editor with XSD support to edit the file. If you don't have one, I'd recommend Notepad++ with the XML Tools plugin.
The XSD can be downloaded here.
<?xml version="1.0" encoding="UTF-8"?> <ServerPack version="2.2"> <!-- The minimum version of MCUpdater required --> <Server id="a_unique_name_for_this_server" name="Your server's friendly name" newsUrl="http://www.example.org/news.html" iconUrl="http://www.example.org/icon.png" version="1.4.7" serverAddress="mcserver.example.org" generateList="true" autoConnect="true" revision="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation='https://raw.github.com/smbarbour/MCUpdater/master/MCU-API/ServerPack.xsd'> <Module name="Sample Mod" id="sample" depends="" side="CLIENT"> <!-- side can be CLIENT, SERVER, or BOTH (default BOTH) --> <URL>http://www.example.org/mods/sample.zip</URL> <ModPath>mods/sample.zip</ModPath> <!-- Optional to specify the path and filename. Otherwise, will be saved as mods/#id#.jar or coremods/#id#.jar depending on the CoreMod element setting --> <Required>true</Required> <InJar>true</InJar> <JarOrder>0</JarOrder> <!-- Should be unique per mod with InJar set to true. Defines the order it is added to the jar. --> <IsDefault>true</IsDefault> <!-- Set to true if you are recommending that the client install this mod --> <Extract>false</Extract> <!-- This is used if the mod file needs to be extracted to the mods folder --> <InRoot>false</InRoot> <!-- If this needs to be extracted to the .minecraft folder, set this to true as well --> <CoreMod>false</CoreMod> <!-- If this mod goes in coremods (MC 1.3.x and later), set this to true --> <MD5></MD5> <!-- Optional, MD5 checksum of the file downloaded from URL above; will be used to avoid redundant redownloads --> <ConfigFile> <!-- Sample of a configuration file --> <URL>http://www.example.org/mods/sample.config</URL> <Path>/config/sample.config</Path> <NoOverwrite>true</NoOverwrite> <!-- Do not overwrite existing (new in 2.5) --> </ConfigFile> <ConfigFile> <!-- Sample of using ConfigFile elements for sub-modules --> <URL>http://www.example.org/mods/sample_submod.zip</URL> <Path>/mods/sample_submod.zip</Path> <MD5></MD5> <!-- As above, but for the config file instead --> </ConfigFile> <!-- Any number of additional ConfigFile elements --> </Module> <!-- Any number of additional Module elements --> </Server> <!-- Any number of additional Server elements --> </ServerPack>
As of MCUpdater 3.0, the ServerPack format has been significantly modified. The new XSD can be downloaded here.
A server pack file can contain multiple server definitions using the <Server> element which has the following attributes:
Within the <Server> element, you can have any number of <Import> and <Module> elements.
This element has one attribute, url, which identifies a remote server pack to import from. If you are importing from the current server pack, this is not needed. The text portion of this element indicates the id of the <Server> to import. The import functionality will correctly load older format server pack files.
The XML files for every defined server are re-downloaded every time MCUpdater launches. If the 'revision' attribute is different from the previous launch, then the user will be prompted to update their mods. If Modules or ConfigFiles contain MD5 nodes, the MD5 checksums will be considered when deciding which files to re-download - any mod or config that does not have MD5's specified will always be re-downloaded.
The MCUpdater jar contains a customization.properties file that tells it where to download its initial xml file from. Additional server definition XML URL's may be entered in from the menu once MCUpdater is running. If no serverpack address is defined in the properties file, the user may be prompted to enter a url when they launch MCU for the first time.
Starting with late 1.35 builds, the serverpack enforces a minimum version of MCUpdater and warns players using too-old jars. However, any newer version should always be compatible. Thus, when MCU is in version 3.0, it should still be able to read and take advantage of a serverpack that requires 1.37.
Directives may be deprecated (that is formally discouraged from further use), but they will likely not be removed unless their continued existence proves to be a problem. In that case, the period of deprecation before removal will be as long as possible.
There are several planned features that will add new options to the serverpack format. The current proposals live on the wiki here at XML Format Updates.