MySQL Player Sync โ€“ Official Wiki

๐Ÿš€ Welcome to the MySQL Player Sync Wiki! Here youโ€™ll find everything you need to set up, configure, and troubleshoot the plugin.

๐Ÿ“Œ Table of Contents

  1. ๐Ÿ”ง Installation

  2. ๐Ÿ’พ Database Setup

  3. ๐Ÿ”„ How It Works

  4. ๐Ÿ“ข FAQ

  5. ๐ŸŽฎ Compatibility

๐Ÿ”ง Installation

  1. Download the latest version of MySQL Player Sync from SpigotMC.

  2. Place the .jar file in the /plugins/ folder on your server.

  3. Start your server to generate the config.yml file.

  4. Edit config.yml with your MySQL database details.

  5. Restart your server โ€“ done! ๐ŸŽ‰

โš™ Configuration

The plugin comes with an easy-to-use config.yml file. Below is a breakdown of the settings:

language: "en" # Available: "en", "de"

mysql:
  host: "localhost"
  port: 3306
  database: "minecraft_db"
  user: "root"
  password: ""

settings:
  auto-save: true  # Automatically save player data on logout
  sync-on-join: true  # Load player data when they join

๐Ÿ”น Supported Languages:

  • en โ†’ English

  • de โ†’ German

๐Ÿ’พ Database Setup

1. MySQL Installation

If you donโ€™t have MySQL installed, follow these steps:

  • Linux: Install via terminal:

    sudo apt update && sudo apt install mysql-server

2. Creating a Database

Run the following commands in MySQL CLI or phpMyAdmin:

CREATE DATABASE minecraft_db;
CREATE USER 'root'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON minecraft_db.* TO 'root'@'localhost';
FLUSH PRIVILEGES;

๐Ÿ”„ How It Works

  • ๐ŸŸข When a player joins โ†’ The plugin loads their saved data from the database.

  • ๐Ÿ”ด When a player leaves โ†’ The plugin automatically saves their inventory, XP, health, and game mode.

  • ๐Ÿ” Cross-server support โ†’ Players will have the same data across multiple servers if connected to the same database.

โ“ Troubleshooting

1. Connection Issues

โŒ Error: Could not connect to MySQL โœ” Solution:

  • Check your config.yml for correct MySQL details.

  • Ensure your MySQL server is running.

  • Allow remote connections if your database is on another machine.

2. Player Data Not Saving

โŒ Error: No data is saved when players leave. โœ” Solution:

  • Ensure auto-save: true is enabled in config.yml.

  • Check the console/logs for errors.

๐Ÿ“ข FAQ

โ“ Does this plugin work with BungeeCord or Velocity? โžก No, this plugin is designed for Spigot/Paper servers only.

โ“ Can I sync data between multiple servers? โžก Yes, as long as they use the same MySQL database.

โ“ Which Minecraft versions are supported? โžก Minecraft 1.21 โ€“ 1.21.4

๐ŸŽฎ Compatibility

โœ” Minecraft Versions: 1.21 โ€“ 1.21.4 โœ” Server Software: Spigot, Paper, Purpur โœ” Database: MySQL, MariaDB

๐Ÿ“ฅ Downloads & Support

๐Ÿ”น Download: SpigotMC Plugin Page ๐Ÿ’ฌ Need Help? Join our Discord

Last updated