MartenM / RedirectPlus

A simple plugin that redirects player when they get kicked of a server.
MIT License
12 stars 5 forks source link

Not Redirecting to Lobby #26

Closed shyshym96 closed 3 years ago

shyshym96 commented 3 years ago

I believe I've set everything up correctly, but it's still not redirecting from the "Towny" server back to "Hub" when the Towny server closes. It either says Server Closed, or Proxy Restarting. This is my config.


messages:
  # Supported placeholders for 'redirected' message:
  # %from-server%  %to-server%  %from-group%  %to-group%  %reason%
  redirected:
    - "&f"
    - "&cAn kick occurred in your connection. &cReason:&r %reason%"
    - "&cYou have been send back to the Hub."
    - "&f"
  unable-redirect-alias:
    - "&f"
    - "&cUnable to send you. All servers in that category are unavailable."
    - "&f"
  unable-redirect-alias-same-category:
    - "&f"
    - "&cUnable to send you to another server in this category."
    - "&f"
  alias-no-permission:
    - "&cYou don't have enough permissions to join this server group."
  alias-not-allowed-server:
    - "&cYou cannot use that command here!"

# The amount of time between checking if a server is online.
# Players won't be connected to offline servers.
check: 30

# The delay that is given to the redirect message.
# When you have a lot of messages when a player joins a certain server this can help to make sure that the redirectplus messages shows as 'newest'.
# The delay is in seconds.
delay: 0

# Blacklist. When a kick message contains this word they will NOT get redirected.
#   This will result in the player seeing the kick screen.
blacklist:
  - "ban"

# Detect shutdown in server kick messages
#   This can be faster for when you want to shutdowns servers and using RedirectPlus to redirectplus those people.
detect-shutdown:
  enabled: true
  messages:
  - "shutdown"
  - "restart"
  - "closed"

# Don't show the redirect message if the message contains one of the following words.
# Can be useful when redirecting people from a game lobby and stuff.
no-messages:
  - "[Silent]"

# Disable the uses of aliases on specific servers.
# Useful when having auth servers and AuthMe is not installed on the BungeeCord
disable-aliases:
  # A list of servers to disable the aliases on.
  servers:
    - someserver1
    - someserver2
  # Regex to identify these servers.
  regex: "none"

# unknown-group / server
# This will redirect unknown servers to the group listed here:
unknown-group: Hub

# Specify defaults here. You can overwrite these settings by adding them to groups them self.
global:
  # Spread modes:
  #   PROGRESSIVE : Fill the server to the progressive-minimal amount, after that fill the next one, giving nicely populated lobbies. Uses LOWEST when the minimal is reached on all servers.
  #   CYCLE       : Cycle to the server to spread the load as much as possible. This can result in players being in a server on their own.
  #   LOWEST      : Send the player to the server with the lowest amount of players online.
  #   HIGHEST     : Send the players to the server with the highest amount of players. (Not adviced!)
  spread-mode: PROGRESSIVE

  # The minimal amount of players that are on a server before the next server gets selected.
  progressive-minimal: 20

# Server groups and their settings
groups:
  Hub:
    # If kicked from this server group, no redirects will happen.
    bottom-kick: true
    # Spread redirected people over the servers.
    spread: true
    # Spread mode, if spread is enabled, use the following spread mode (will overwrite global if used).
    spread-mode: PROGRESSIVE
    # The minimal amount of players that are on a server before the next server gets selected. (only used for PROGRESSIVE spread)
    progressive-minimal: 20
    # Parent group - If none of the servers are available, the parent group will be used.
    # Set to none if none. If the parent server group is needed the player will be kicked instead.
    parent-group: none
    servers:
      - Hub
    servers-regex: 'none'
    # Servers that are connected to this group, but they won't be redirected to:
    connected: {}
    connected-regex: 'none'
    # Aliases can be used to redirect people to the server group when they use a certain command (Eg: lobby, hub, survival, towny, etc)
    aliases:
      - lobby
      - hub

Towny:
    bottom-kick: false
    spread: true
    parent-group: Hub
    # These servers do not have lobbies them self so we use a parent group.
    servers:
      - Towny
    servers-regex: 'none'
    connected:
      - lobby
    connected-regex: 'none'
    # Aliases can be used to redirect people to the server group when they use a certain command (Eg: lobby, hub, survival, towny, etc)
    aliases:
      - towny

# Log settings, this will show your messages in console so you know what's going on.
log:
  # If set to true the plugin will log redirects attempts that are canceled due to blacklisted words.
  blacklist: true
  # If set to true the plugin will log redirects that fail because no server was found.
  redirect-failed: true
  # If set to true the plugin will log players that do not get redirected due to the bottom-kick setting enabled.
  bottom-kick: false
  # If set to true the plugin will log successful redirect attempts.
  redirected: true
  # If set to true the plugin will log any cancelled redirect attempts due to inactive connections.
  inactive: true```
MartenM commented 3 years ago

Please enable the log options and check if it mentions anything. Also the Proxy restarted message is when the bungee cord restarts. In that case no redirects can happen.

shyshym96 commented 3 years ago

I have 3 servers; Bungeecord, Hub, and Towny. I didn't restart the Bungeecord, only the Towny server. I apologize for any inconvenience, I'm still pretty amateur at learning to read code/configs, and I'm attempting to learn to write code as well. By enable log are you meaning to remove the # symbol from this part of the config?


log:
  If set to true the plugin will log redirects attempts that are canceled due to blacklisted words.
  blacklist: true
  If set to true the plugin will log redirects that fail because no server was found.
  redirect-failed: true
  If set to true the plugin will log players that do not get redirected due to the bottom-kick setting enabled.
  bottom-kick: false
  If set to true the plugin will log successful redirect attempts.
  redirected: true
  If set to true the plugin will log any cancelled redirect attempts due to inactive connections.
  inactive: true```
MartenM commented 3 years ago

No that will remove the comments. Lines that start with # are comments. You need to set every option to true.