Network setup (Velocity and BungeeCord)
On a network, purgatory is its own backend server. The proxy sends purgatory-banned players there, blocks them from every other server, and refuses hard-banned players at login. All servers and the proxy share one MySQL database.
- Create a MySQL or MariaDB database.
- On every backend, set
storage.type: MYSQLwith the same database and credentials, a differentserver-namefor each server, andnetwork.purgatory-serverto the purgatory backend's name in your proxy. - On the purgatory backend only, set
network.this-is-purgatory-server: true. It then hosts the purgatory world. - Put the same jar on the proxy and start it once. Then edit
plugins/mcbans/config.ymlon Velocity orplugins/mcBans/config.ymlon BungeeCord: the MySQL details,purgatory.serverandpurgatory.release-server. - Restart everything and run
/mcbans infoon a backend to confirm the mode.
network:
mode: auto
purgatory-server: "purgatory"
this-is-purgatory-server: false
route-timeout-seconds: 8network.mode is auto (proxy mode when the backend is behind a proxy and a purgatory server is set), single or proxy. route-timeout-seconds is how long a purgatory-banned player may stay on a backend before being disconnected, if the proxy did not move them.
Proxy config#
mysql:
host: "localhost"
port: 3306
database: "mcbans"
username: "root"
password: ""
ssl: false
pool-size: 4
# Must match storage.table-prefix on the backends.
table-prefix: "mcbans_"
purgatory:
# Must match purgatory.enabled on the backends.
enabled: true
# The purgatory backend's name in the proxy's server list.
server: "purgatory"
# Where players go when they are released from purgatory.
release-server: "lobby"The proxy messages (messages.ban-screen, purgatory-unavailable, sent-to-purgatory, released) use & color codes. The ban screen supports {reason}, {staff}, {duration}, {expires}, {id}, {date} and {appeal}. Restart the proxy after changing this file.
A network needs storage.type: MYSQL on every server and on the proxy, with the same table-prefix. YAML and SQLite only work on a single server.