Skip to content

Server switch

Person8880 edited this page Apr 4, 2015 · 2 revisions

Overview

Provides a way for clients to switch between pre-defined servers. The plugin will add a button to the vote menu which will display all available servers to switch to.

Config

The default config file should look something like this:

{
    "Servers": [ {
        "Name": "Public #2",
        "Port": "27015",
        "IP": "127.0.0.1",
        "Password": ""
      },
      {
         "Name": "Private #1",
         "Port": "27025",
         "IP": "127.0.0.1",
         "Password": "supersecret",
         "UsersOnly": true
      } ]
}

The file should be called “ServerSwitch.json” and should be placed in the directory defined as your plugin config directory (default is config://shine/plugins).

For each entry in "Servers", you need to define the IP and Port of the server you want people to be switched to, give it a name (for the listing command) and give it the password to use if applicable.

If you set "UsersOnly" to true, then only registered users in the UserConfig.json file can switch to the server. Use this for switching to a private server.

Commands

Command Chat Command Arguments Description
sh_switchserver !server <number> Sends the player to the server assigned to the given number.
sh_listservers N/A N/A Lists the servers set in the plugin's config by their number.
Clone this wiki locally