Black Friday Black Friday SALE: 40% off every resource until December 1. Shop the sale

Sharing the pass between servers

Connect several servers to one MySQL or MariaDB database so players keep one pass.

On this page

Point every server at the same MySQL or MariaDB database and they share one pass.

Set it up#

  1. Create an empty database and a user for it.
  2. In plugins/OtPass/config.yml on every server, set:
storage:
  type: mysql
  mysql:
    host: localhost
    port: 3306
    database: minecraft
    username: root
    password: ''
    pool-size: 4
  table-prefix: otpass_
  sync-interval-seconds: 5
  1. Use the same config.yml, quests.yml and rewards.yml on every server. This includes the season settings, xp-per-tier and season.timezone, so quests and tiers match.
  2. Restart every server. OtPass creates its tables.

mariadb is accepted as storage.type as well.

How it behaves#

  • Changed progress is saved every sync-interval-seconds and when a player leaves, so players keep their quests when they switch servers. On MySQL the pass of a joining player loads about one and a half seconds after the join.
  • XP is added in the database instead of overwritten, so XP given by staff on one server is never lost on another.
  • Every 30 seconds each server reads the XP and the premium flag of its online players again, so changes from other servers show up.
  • Every claim is recorded in the database before the reward is given. A reward cannot be paid twice, not even when a player claims and switches servers at the same moment.
  • Rewards are given on the server where the player claims them.
  • Money rewards and premium purchases use the economy of the server where they happen. Use one shared economy on all servers.

Last updated

Still stuck? Open a ticket on the help page or ask in Discord. Mention your version and what you tried.