Compatibility
Minecraft: Java Edition
Platforms
Creators
Details
Believe it or not, Minecraft actually has this functionallity built in through the TRANSFER packet (0x7F). This packet allows a server to tell a client to disconnect from it and connect to another instead. Clients as low as 1.20.5 support this packet, and you might be able to go even lower under specific circumstances, more info about this can be found in the compatability
Using this plugin is as simple as can be. There's a fairly limited amount of permissions, commands, and config. Below is the main command of the plugin (/serverswap)
/serverswap
┣ swap <server> [players]
┖ reload
Do note that the serverswap command is also accessible via the alias of ss. Whilst swapping your own server requires that a player be running the command (else who are transfer). Transfering whilst specifying players and reloading can be run by any executor with sufficent permissions such as console or even if you wanted a really enthusiastic pig.
By default the plugin ships with this config file:
# ServerSwap configuration - list your target servers here
# The plugin will create permissions for each entry automatically:
# serverswap.use.<server>
# serverswap.use.others.<server>
# You can also grant the wildcard permissions:
# serverswap.use.*
# serverswap.use.others.*
servers:
Hub:
address: hub.example.com
port: 25565
Minigames:
address: minigames.example.com
port: 25565
autoRedirect:
play.example.com: Hub
pvp.example.com: Minigames
Let's break this down each property at a time. First up we have the servers block which is where you tell the plugin where to find each server, it will have an address and a port associated with it. In the default config file there is two servers configured one being called "Hub" which links to a server at hub.example.com on port 25565 (The default minecraft port).
Then we have the autoRedirect section, this is similar to Velocity's forced-hosts. In short if someone connects to your server by joining the hostname specified as the objects name (in this case being play.example.com) it will transfer them automatically to the corrisponding server such as Hub.
There are some default permisisons that the plugin creates and then there are dynamic permissions based off your config file. Let's start off by listing the static permissions:
serverswap.use/serverswap.use.*: Allows the player to transfer them to any server specified within the config file. Default: Trueserverswap.use.others/serverswap.use.others.*: Allows the executor to transfer other players to any server specified within the config file. Default: OPserverswap.reload: Allows the user to simply reload the config file for the plugin and regenerate permissions based on it. Default: OP
Now as for the dynamic permissions:
serverswap.use.[serverName]: Allows the player to swap themselves to the specified server.serverswap.use.others.[serverName]: Allows the exector to transfer other players to the server specified in the permission.



