Skip to content
Jonathan Chan Kwan Yin edited this page Aug 7, 2022 · 1 revision

Schemas allow each player to have multiple accounts. The type of schema determines how these accounts are classified:

Basic schema

The basic schema involves only one account for each player. No configuration is required at all.

Currency schema

With the currency schema, you can setup fixed currency types for your server.

First change the schema section in the Capital config:

schema:
  type: currency
  currencies:
    coins:
      default: 100
      min: 0
      max: 10000000
      import-from: ~
    tokens:
      default: 1000
      min: 0
      max: 10000000
      import-from: ~
  default-currency: tokens

We've created two currencies called coins and tokens! Other plugins typically have a config entry called "selector". You can fill in the entry like this:

selector:
  currency: tokens

This plugin will use the tokens account.

World schema

⚠️ The world schema is still WIP!

With the world schema, each player has one account per world. First we set the schema type to world:

schema:
  type: world

Then we setup the account settings as normal:

  default:
    default: 100
    min: 0
    max: 10000000

You can also change these values for specific worlds:

  specific-worlds:
    hub:
      default: 200
      min: -100
      max: 300
    stage:
      default: 2000
      min: 0
      max: 2000

This overrides the settings in the worlds called stage and hub.

Plugins will take money from the account of the world player is currently in by default. You can force a plugin to always take money from a specific world account by changing its "selector" config:

selector:
  world: hub

This always uses the hub world account.