Skip to content

Config Syntax

glowredman edited this page Jun 29, 2022 · 2 revisions

The default config (located at /config/defaultserverlist.json) looks like this (version 1.2):

{
  "useURL": false,
  "allowDeletions": true,
  "url": "",
  "servers": {},
  "DO_NOT_EDIT_prevDefaultServers": []
}

servers

Between the curly braces {} you can add a list of name/ip pairs. You can use formatting codes in the server-name. Example:

{
  "useURL": false,
  "allowDeletions": true,
  "url": "",
  "servers": {
    "My Server 1": "myserver.example.com",
    "My Server 2": "myserver.example.com:1337",
    "§4§k__ §5My §6Special §2Server §4§k__": "other.example.com"
  },
  "DO_NOT_EDIT_prevDefaultServers": []
}

allowDeletions

If set to true, the user is able to delete default server entries permanently.

useURL and url

You can provide a JSON file via an URL. set "useURL": true and paste the direct link to url. The contents of servers will be ignored (before adding the config file to a pack and useURL is set to true, you should delete the contents of servers and DO_NOT_EDIT_prevDefaultServers). Example:

{
  "useURL": true,
  "allowDeletions": true,
  "url": "https://gist.githubusercontent.com/glowredman/c353ffe1ec49c7afb832b3f24be21171/raw/a19bac25b00df415666c9faffd4a56a6701be1f5/servers.json",
  "servers": {},
  "DO_NOT_EDIT_prevDefaultServers": []
}

DO_NOT_EDIT_prevDefaultServers

This field is only used if both useURL and allowDeletions are set to true. It is used internally to find any mods that have been added to the remote location since the last game launch. If allowDeletions is set to false, the servers field is simply overridden on each launch.

Clone this wiki locally