Proxy and Databases - No-Not-Jaden/NotBounties GitHub Wiki
In order to synchronize bounties, player stats, and other data across servers, databases can be used. You have multiple options to choose from:
- Proxy (Velocity)
- MySQL
- Redis
Proxy
Currently, only Velocity is supported, but if you want other platforms supported, shoot a message in the discord.
- Download the NotBounties-Velocity file from releases. Find the latest post that has Velocity in the title, and open the assets for that post to find the file.
- Add the NotBounties-Velocity file to your proxy. Add the Spigot version of NotBounties to each backend server (Bukkit/Spigot/Paper/etc...), and restart all the servers to enable the plugin and generate the config files.
- In each backend server, open the config.yml file and scroll down to the
databases
configuration section. If you're generating the config for the first time, you will see anexample-proxy
section. If you are updating from an older version, you will need to add this.
# Optional database connections for storing bounties and player stats
# You can add as many as you want
databases:
# you can change 'example-proxy' to a different name if it helps you keep track of it
example-proxy:
type: PROXY
# Whether proxy messaging is enabled.
enabled: false
# Whether bounties and player stats will be synchronized with other servers connected to the proxy.
database-sync: true
# Whether skins can be obtained from the proxy. This is mainly used for SkinsRestorer
skins: true
priority: 3
Set enabled
to true, and reload the plugin with /bounty reload
That's it! Once a player joins, the server should start synchronizing data across the proxy. If you're having trouble with synchronization, you can enter notbountiesdebug
in the console for the proxy to print out information when the proxy receives a message. You can also run the /bounty debug enable
command to do the same thing on a backend server.
MySQL
If you are using a MySQL database for other servers already, this may be the easiest for you.
- Make sure NotBounties is installed on all servers. After your server has restarted, the configuration files will generate in the plugins/NotBounties folder.
- Go into the config.yml file and scroll to the databases configuration section. You should see an
example-sql
section with settings.
# Optional database connections for storing bounties and player stats
# You can add as many as you want
databases:
# you can change 'example-sql' to a different name if it helps you keep track of it
example-sql:
# the type of database
type: SQL
# all the regular database options
host: localhost
port: 3306
database: db # SQL specific: name of the database
user: username
password: pass
ssl: false
# how long between database refreshes in seconds
refresh-interval: 300
# higher priority means that this database will be used more
priority: 1
Configure your host, port, database name, username, and password.
3. Save and reload the plugin with /bounty reload
Synchronization should begin within 5 minutes.
Redis
Redis setup is similar to MySQL. Note that data in a Redis database may not save if the database restarts, but worry not! NotBounties will save data locally if this happens, and automatically refill the database. If you wanted, you could also setup another database, MySQL for example, and use Redis with a faster refresh interval and higher priority for quicker query times.
- Make sure NotBounties is installed on all servers. After your server has restarted, the configuration files will generate in the plugins/NotBounties folder.
- Go into the config.yml file and scroll to the databases configuration section. You should see an
example-redis
section with settings.
# Optional database connections for storing bounties and player stats
# You can add as many as you want
databases:
# the redis config is very similar to SQL
example-redis:
type: REDIS
host: localhost
port: 3306
user: username
password: pass
ssl: false
database-number: -1 # Redis specific: database number, -1 disables it
# how long between database refreshes in seconds
refresh-interval: 300
# higher priority means that this database will be used more
priority: 2
Configure your host, port, username, and password.
3. Save and reload the plugin with /bounty reload
Synchronization should begin within 5 minutes.