The Code has been cleaned up a bit and reads the config file only during startup and reload.
Before, it checked the file on every command usage and when players tried to connect to a server.
Additionally this means the config cannot be edited on the fly and needs a reload after change.
This can be done with
/versioncontrol reload
> Permission: versioncontrol.reload
Alias:
- versioncontrol
- versionc
- vcontrol
The fallback server can now be edited with an ingame command:
/versionc fallback SERVERNAME
> Permission: versioncontrol.fallback
It is also possible to to set it to kick, which kicks the user from the network when they try to connect and the server is unavailable for their version.
(They won't get kicked, if they try to switch servers)
Good to know about that:
- When forced_hosts is used and the player joins with it on a server that is compatible with his version, he will be able to join
- force_default_server will always try to connect the player to the priorities servers set in the config.
- When the first server is version restricted, the server then tries to connect the player to the second one (and so on)
Known bugs:
- fallback command sends a number
- if all servers in the priority list are version restricted, then the server kicks the player with the error "Could not connect to a default or fallback server, please try again later: io.netty.channel.AbstractChannel$AnnotatedConnectException"
- if first server in priorities list is version restricted, players get a double message saying that the previous server is version restricted as well as "Could not connect to target server"