Data Storage
π§ Overview
The plugin supports two main storage methods for saving player and game data:
Local (JSON Files) β Easy to access and modify directly.
MySQL Database β Recommended for larger servers or multi-instance setups.
All player data, statistics, and settings are stored in structured JSON files by default, ensuring easy manual editing when needed.
π File Structure
All data is located in the /ArenaLegends/data/ directory.
/data/settings.yml
Contains various local plugin settings.
/data/metrics.yml
Used for tracking plugin metrics and analytics.
/data/players/
Stores individual player data files in JSON format.
Example structure:
/ArenaLegends/
βββ data/
βββ settings.yml
βββ metrics.yml
βββ players/
βββ Notch.json
βββ Steve.json
βββ Alex.jsonποΈ MySQL Integration
You can switch from local file storage to MySQL for centralized and scalable data management.
How to Enable MySQL
Open your main configuration file:
/ArenaLegends/config.ymlLocate the
mysql-settingssection.Set
enabledtotrue.Fill in your database credentials (host, port, database, username, password).
βοΈ Configuration
mysql:
connection:
# Turn on/off the MySQL connection.
enabled: false
# The address to connect to the database.
url: "jdbc:mysql://{HOST}:{PORT}/{NAME}"
# The highest number of connections allowed at once.
maximum-pool-size: 10
# The lowest number of spare connections to keep ready.
minimum-idle: 5
# How long a connection can exist (in milliseconds).
max-lifetime: 1800000
# How long an unused connection stays open (in milliseconds).
idle-timeout: 600000
# How long to wait for a connection before giving up (in milliseconds).
connection-timeout: 30000
# Time to wait before warning about a stuck connection (in milliseconds).
leak-detection-threshold: 60000
# Automatically save database changes.
auto-commit: true
credentials:
# The computer address where MySQL is running.
host: "value"
# The connection port number for MySQL.
port: "3306"
# The name of your database.
name: "value"
# Your MySQL username.
user: "value"
# Your MySQL password.
pass: "value"Last updated