Skip to content
Andrew edited this page Jan 14, 2017 · 2 revisions

Example

# Specify all your hub servers here: (required)
servers:
- Hub1
- Hub2
- Hub3

# Specify the required client version for each Hub, leave as an empty array [] to use BungeeCords' defaults.
# The values are parsed as Integers and can be obtained from http://wiki.vg/Protocol_version_numbers
required-client-versions:
  Hub1: []

# Specify the duration (in seconds) between server pings.
# This is used in selecting servers for the "lowest", "firstavailable", "random" and "sequential" modes.
# 3 seconds is the default. If you have more than 10-12 hubs this number may need increasing.
ping-duration: 3

# Specify the type of server selection you want.
# HubMagic supports the following modes:
# - lowest: Will attempt to connect to the least-populated server.
# - firstavailable: Attempts to connect to the first available server in the list above.
# - random: Attempts to connect to a random server.
# - sequential: Attempts to connect to the the servers listed above in sequence.
#
# The recommended default is "lowest".
type: lowest

# Specify how HubMagic will direct players to hubs upon connecting:
# HubMagic supports the following:
# - reconnect: Reconnects all players that join the network to a hub.
# - none: Disables HubMagic's reconnect handling. This still provides for /hub.
connection-handler: reconnect

# Specify the ping strategy to use.
# HubMagic supports the following:
# - bungee: Uses the BungeeCord ping handler. Recommended but doesn't work in some situations.
# - fallback: Uses zh32's server list ping library which may work better in some cases.
#
# The recommended default is "fallback".
ping-strategy: fallback

# Whether or not kicks will take you back to the hub.
# This applies only when the server is not listed in this file as a hub server.
# You may also optionally control it by using regex in this file.
# The default is enabled, without any regex matches, effectively disabling the function.
kicks-lead-to-hub:
   enabled: true
   mode: "reasons"
   reasons: []
   servers: []
   message: "&cThe server you were on is now down, you have been connected to the hub."
   # You can use any HubMagic selector here, but "random" and "sequential" is recommended.
   selector: sequential
   # Whether or not to invert the matched checks (allowing the matches to act as a blacklist). For instance, if a
   # player's kick reason or server matches the list, they WILL NOT be reconnected to the hub and will be kicked instead.
   # Conversely, this setting is on and no reasons or servers are fined, anyone on those servers will be moved to the hub.
   blacklist: false

# Options for the hub command.
hub-command:
   # Whether or not the command is enabled.
   enabled: true
   # Whether or not to require hubmagic.hub permission.
   requires-permission: true
   # The aliases used to access this command.
   aliases:
   - hub
   - leave
   - lobby
   # If you have aliases that must be forwarded to the backend server,
   # this will ignore HubMagic's handling for it.
   # Regex is supported.
   forwarding:
      global:
      - minigameserver1
      - minigameserver2
   # Messages for /hub. There is only one message currently available.
   messages:
      already_connected: "&cYou are already on a hub."
      no_hubs_available: "&cNo hubs are currently available to connect to."

Explanation

servers

All your hub servers go here. At least two should be present in order to use balancing; if only one is specified, no balancing will be performed.

required-client-versions

This specifies protocol versions accepted per-hub, allowing HubMagic to be used to balance servers based on client versions. If the client's protocol version does not match for that server, HubMagic will skip that server.

ping-duration

This controls how long HubMagic will wait before sending a server list ping to a hub.

type

This controls how your hubs will be populated.

  • lowest: Will attempt to connect to the least-populated server.
  • firstavailable: Attempts to connect to the first available server in the list above.
  • random: Attempts to connect to a random server.
  • sequential: Attempts to connect to the the servers listed above in sequence.

ping-strategy

This determines what strategy is used to ping your hubs.

  • bungee: Default, uses BungeeCord's internal pinging mechanism.
  • fallback: Uses zh32's server list ping library which may work better in certain cases.

connection-handler

This determines whether or not HubMagic will balance incoming players.

  • reconnect: Reconnects all players that join the network to a hub.
  • none: Disables HubMagic's reconnect handling. This still provides for /hub.

kicks-lead-to-hub

enabled

Controls whether or not the feature is enabled. By default, it is enabled but no matches are set up, meaning it is effectively disabled.

reasons

This list contains a list of strings that will kick you to the hub if the kick reason matches them. Partial matches and regex are supported. To match all reasons, you can use the .* regex as a reason.

message

The message you receive when kicked to the hub. It supports color codes and multi-lines. The following variables are available:

  • %kick-reason%: The reason for the user being kicked from the server.
  • %server%: The server from which the user was kicked from.

selector

Allows you to pick a different selector when you are kicked from a server. It is recommended to change this, especially for users of the lowest and firstavailable selectors, as these selectors do not update quickly. It is recommended to use random and sequential as they will always select a different hub.

hub-command

enabled

Enables the hub command. Note that you must still add aliases.

requires-permission

If enabled, players will require hubmagic.hub permission to use the hub commands.

aliases

Specifies other aliases for the hub command.

forwarding

This setting controls whether or not the hub command should be handled by HubMagic or forwarded through, depending on the server the player is on. This setting is per-command and supports regex for matching the server name, so you can allow /hub for people on all servers but disallow /lobby on servers starting with "SG" like this:

forwarding:
  hub: [] # empty, no overrides
  lobby: ["^SG.*$"] # SG servers need to have /lobby forwarded

### messages

Allows you to customize errors shown to players that use /hub.