database

ZelBounty supports three database types: SQLite, MySQL, and MongoDB.

SQLite (Default)

SQLite is the default database and requires no setup. Data is stored in plugins/ZelBounty/bounties.db.

database:
  type: SQLite
  table-prefix: bounty_

Pros:

  • No setup required

  • Works out of the box

  • Good for single servers

Cons:

  • Not suitable for networks/BungeeCord

  • Limited concurrent connections

MySQL

MySQL is recommended for larger servers or networks.

Setup

1

Create a MySQL database

2

Configure in config.yml

Alternative: Full JDBC URL

For advanced configurations, use a full JDBC URL:

Pros:

  • Supports BungeeCord/Velocity networks

  • Better performance under load

  • Remote database support

MongoDB

MongoDB is ideal for large-scale servers or those already using MongoDB.

Setup

1

Install MongoDB on your server

2

Configure in config.yml

With Authentication

Remote MongoDB

Pros:

  • Excellent scalability

  • Document-based (flexible)

  • Great for large datasets

Database Schema

ZelBounty creates the following tables/collections:

Bounties Table

Column
Type
Description

uuid

VARCHAR(36)

Player UUID (Primary Key)

player_name

VARCHAR(16)

Player's name

bounty_amount

DOUBLE

Current bounty

total_bounties_set

INT

Bounties placed by player

total_bounties_claimed

INT

Bounties claimed by player

last_updated

BIGINT

Last update timestamp

cached_texture

TEXT

Skin texture for GUI

History Table

Column
Type
Description

id

INTEGER

Auto-increment ID

action

VARCHAR(16)

ADD, REMOVE, RESET, CLAIM

performer_uuid

VARCHAR(36)

Who performed action

performer_name

VARCHAR(16)

Performer's name

target_uuid

VARCHAR(36)

Target player

target_name

VARCHAR(16)

Target's name

amount

DOUBLE

Amount involved

timestamp

BIGINT

When it happened

Migration

Migrating Between Database Types

1

Create a backup first

Run the built-in backup command:

2

Change database type in config

Update your config.yml to the desired database type and connection settings.

3

Use migrate command

Run:

Importing External Data

Import data from a separate database file:

Backup

Create timestamped backups:

Backups are saved to plugins/ZelBounty/backups/.

Table Prefix Warning

The table-prefix setting should not be changed after data has been created. If you need to change it:

1

Backup your data

2

Change the prefix

3

Migrate your data using the migrate command

Performance Tips

  1. Use MySQL/MongoDB for servers with 50+ concurrent players

  2. Use local database when possible (lower latency)

  3. Regular backups are recommended

  4. Monitor disk space for SQLite databases