AoElite / AutoReconnect

A bungeecord plugin that automatically reconnect players when a server restarts.
MIT License
14 stars 7 forks source link

It does not connect to fallback server after failed reconnection. #8

Closed plytki closed 4 years ago

plytki commented 4 years ago

image

PseudoResonance commented 4 years ago

It looks like you're using my updated version of the plugin, but without any information, I can't really tell what the issue is. In my testing, the fallback works perfectly. Can you give me your BungeeCord configuration, plugin configuration, and BungeeCord version info? For example, if you're using BungeeCord, Waterfall, or FlameCord, or some other build?

plytki commented 4 years ago

I'm using waterfall-346.

Plugin Config:

AutoReconnect Config File

In this file, you can setup some basic settings for the plugin.

The current version of this configuration. Do NOT change this value!

If the plugin uses a more recent config version, this config gets replaced by it

while a backup of the old config will be kept as "config.old.yml".

version: 4

The text that should be displayed, when the plugin is trying to reconnect a player.

Leave empty if you don't wish any title or action bar message to be displayed.

reconnecting-text:

You can add animated dots to the reconnecting title and action bar by using the {%dots%} variable.

You can add the server name by using the {%server%} variable.

chat: "" title: "&7Reconnecting{%dots%}" actionbar: "&a&lPlease do not leave! &7Reconnecting to server{%dots%}"

Interval between message updates in milliseconds

The dots variable will update at each send-interval

Set to 0 to only send messages each time a new connection attempt is made

send-interval: 1000

The text that should be displayed, when the plugin managed to establish a connection to

the previous server and now connects the player to it.

Leave empty if you don't wish any title or action bar message to be displayed.

connecting-text:

You can add animated dots to the connecting title and action bar by using the {%dots%} variable.

You can add the server name by using the {%server%} variable.

chat: "" title: "&aConnecting..." actionbar: "&7Connecting you to the server..."

The text that should be displayed, when the reconnection to the previous server

was rejected by a plugin and the player was connected to the fallback server.

Leave empty if you don't wish any title or action bar message to be displayed.

rejected-text:

You can add the server name by using the {%server%} variable.

You can add the disconnection reason by using the {%reason%} variable.

chat: "&cDiscononected from {%server%} with reason: {%reason%}" title: "" actionbar: "&eYou have been moved to the fallback server!"

The text that should be displayed, when the plugin didn't manage to etablish

a connection to the previous server and connected the player to the fallback server.

Leave empty if you don't wish any title or action bar message to be displayed.

failed-text:

You can add the server name by using the {%server%} variable.

You can add the disconnection reason by using the {%reason%} variable.

chat: "&cDiscononected from {%server%} with reason: {%reason%}" title: "&cReconnecting failed!" actionbar: "&eYou have been moved to the fallback server!"

The text that should be displayed in chat, when the plugin didn't manage to etablish

a connection to any server and the user was redirected to limbo.

limbo-text: "&cYou are in limbo! Use /server to leave at any time."

The text that should be displayed, when the plugin didn't manage to etablish

a connection to the previous server and connected the player to the fallback server.

Leave empty if you don't wish for a generic lost connection message to be displayed.

You can add the server name by using the {%server%} variable.

You can add the disconnection reason by using the {%reason%} variable.

kick-text: "Disconnected from {%server%}\n{%reason%}"

If true, the player is moved to an empty limbo world while attempting to reconnect.

This protects against the player moving around and breaking blocks to access normally

inaccessible areas.

This requires the Protocolize plugin to function

https://www.spigotmc.org/resources/protocolize-protocollib-for-bungeecord-waterfall.63778/

move-to-empty-world: true

If true and move-to-empty-world, above, is true, the player will be left in limbo instead

of being disconnected if reconnection fails.

do-not-disconnect: true

The amount of milliseconds the plugin should wait before attempting to check if the server is alive.

delay-before-trying: 15000

The maximum amount of reconnect tries the plugin should make, before either connecting the player

to your fallback-server or disconnecting him. This value cannot be less than 1.

max-reconnect-tries: 2

The amount of milliseconds the plugin should wait before making a new reconnect try. This value

cannot be less than zero.

reconnect-time: 1000

The amount of milliseconds the plugin should wait for a reply from the previous server, until it

decides to abort that reconnect try. This value cannot be less than 1000.

reconnect-timeout: 5000

A List containing all servers that don't allow automatic reconnecting.

ignored-servers: []

This block is necessary for the plugin to differentiate whether a kick happened because of a shutdown or not.

shutdown:

When regex is set to false, the kick message must be equal to the following text if the player should be reconnected to that server. (Formatting codes will be ignored though.)

When regex is set to true, the regex must match the kick message if the player should be reconnected to that server.

Leaving the text empty will lead the plugin to always reconnect the players, no matter what the actual kick-reason was.

You can still use the "ServerReconnectEvent" as a plugin developer to decide on your own whether the user should be reconnected automatically

or not.

text: "Server closed" regex: true

BungeeCord Config:

prevent_proxy_connections: false listeners:

PseudoResonance commented 4 years ago

The issue is that you have not defined your server priorities in the bungee config. If you look in the config for priorities, you need to add all of your servers in that list, in the order of priority. At the moment, you only have lobby in there, but you should add all of your servers. Because of the way BungeeCord works, it won't be able to find lobby if it can't first find your current server (test) in that list. It should also help with being able to log on if lobby is offline.

I will try to update the messages to be clearer about not being able to find a fallback server.

PseudoResonance commented 4 years ago

No reply, so assuming issue is resolved.