Using it

Server selector

Players open the selector with the compass join item or /servers. Each card is defined in servers.yml, or in /mchub admin > Servers.

A card#

servers:
  survival:
    enabled: true
    name: "<primary><bold>Survival"
    icon: GRASS_BLOCK
    description:
      - "<muted>Build, explore and trade"
      - "<text>Online <muted><arrow> <accent>{server_survival_players}"
    motd: ""
    slot: 0
    proxy-name: survival
    address: "play.example.com:25565"
    permission: ""
    whitelist:
      enabled: false
      players: []
    action:
      type: CONNECT
KeyMeaning
enabledShow the card
name, descriptionMiniMessage text. Description lines accept {placeholders}
iconAny item name. For PLAYER_HEAD add icon-texture (a base64 skin value)
motdA fixed MOTD line. Blank shows the server's own MOTD when it is pinged
slot1 to 54. 0 places the card automatically, centered
permissionPermission needed to click the card
whitelistWhen enabled, only the listed player names or UUIDs can click. mchub.server.whitelist.bypass ignores it
action.typeCONNECT sends the player to proxy-name through the proxy. COMMAND runs action.command (action.run-as is player or console; {player} is replaced)
proxy-nameThe server's name in your BungeeCord or Velocity config
addresshost:port to ping for status, players, MOTD and latency

What a click does#

  1. The permission and whitelist are checked.
  2. An offline card refuses the click, unless selector.offline-click is true.
  3. ServerSelectEvent is fired and can be cancelled.
  4. The player is connected through the proxy, or the command runs.

selector.rows (3 to 6), selector.border, selector.refresh-ticks (how often an open menu redraws), selector.show-latency, selector.show-motd, selector.glow-online, selector.network-info (the total at the bottom). The menu title and every line on a card are in lang.yml under selector.