Minecraft Wiki
Advertisement
This is the documentation page. It should be transcluded into the main template page. See Template:Documentation for more information
Lua logo
This template uses Module:Downloadlinks, with data stored in Module:Downloadlinks/hashes.
These scripts are written in Lua.

This template's purpose is to show download links using hashes stored in the module's data module.

Usage

{{downloadlink|1|2[|3|nocat=1|force_download=1]}}

In here:

|1=
The version of the game. Mandatory.
|2=
The variant of the version. One of the following values: client, server, windows/windows_server or json/json_package. Mandatory.
Internally, windows will be converted to windows_server. json will be converted to json_package, though if no hash could be found for that key, json will be used instead, thus prompting a download window rather than opening the JSON in browser.
|3=
Description. Optional. When no description will be provided, the following text will be displayed for variant given in |2=:
Variant Description
client Client
server Server
windows/windows_server .exe
json/json_package .json
|force_download=
When set, the module will look for the key json in the version's hashes, rather than using the key json_package. Only works for json and thus has no influence on any other link. Optional, defaults to 0.
|nocat=
Whether or not the page should be added to the category invalid download link when the module outputs an error. Optional, defaults to 0.

Example

* {{downloadlink}}
* {{downloadlink|18w20c|client}}
* {{downloadlink|18w20c|server}}
* {{downloadlink|18w20c|json|Only data, no game!}}
* {{downloadlink|1.5.1|windows|Deprecated version!}}
gives

Missing version

When no download link could be constructed, the page is automatically added to the Category:Invalid download link. Missing hashes can be added to the data module, provided the hashes are correct.

Advertisement