User Tools

Site Tools


leaderheads:syncing

Syncing statistics using LeaderHeads

Most modern servers have a big network with smaller subnetworks. To explain this feature, we'll use a detailed example. Imagine a big skywars network that runs multiple lobbies and multiple skywars servers. Because the players arrive in the lobby first, that's where you want to show the leaderboard. Due to the fact that the skywars plugin that you have on your skywars servers is not installed in the lobby, this is a bit hard. That's where the leaderboard syncing feature comes in. Follow these steps to use it on your own server.

  1. Install LeaderHeads on all your servers, including the lobby and skywars.
  2. Enable MySQL in the database.yml of each server and make sure they are all connected to the same database.
  3. Configure the server option in the database.yml file of each server. Make sure to give your servers a name per group. This means that you should call all your skywars servers skywars and not skywars1, skywars2 etc. if your skywars servers share the same data.
  4. In all your servers where your statistics are that you want to sync, in this case the skywars servers, enable force-update in the files of the statistics that you want to use. Make sure to reload the plugin afterwards.
  5. In your server where you want to show the statistic, in this case the lobby servers, make a regular LeaderHeads sign with the statistic that you want to sync on. This sign will not work at that point.
  6. Use the command /leaderheads setserver <name>, where name is the server that you want to sync from, in this case skywars, to set this sign to synchronize from the server that you want. If this is the first time, the plugin will generate a file located at synced-statistics/servername/statistic.yml to configure this statistic.
leaderheads/syncing.txt · Last modified: 2017/05/13 21:40 by robirami