MySQL Economy Bridge MySQL经济桥梁

作者:brunyman 发布时间:2015年4月18日 原生版本:未知 测试支持:1.7,1.8,1.9,1.10,1.11,1.12,1.13,1.14,1.15

[1.7.10-1.15.2]使用MySQL跨多台服务器同步您的经济型账户。

点此下载

插件详细介绍

💰 MysqlEconomyBridge

MysqlEconomyBridge 是一个轻量级的 Spigot 插件,它利用 Vault 框架将玩家的经济账户同步到 MySQL 数据库,从而在多个服务器之间创建一个全局经济系统。这对于同步中心服务器的经济非常有用。请注意,这不是一个 BungeeCord 插件。

✨ 特性

  • 支持 Premium UUID 和 Offline UUID。
  • 仅支持 MySQL 数据库。
  • 支持任何与 Vault 兼容的经济系统。

⚙️ 工作原理

插件监听服务器的加入和离开事件,通过 MySQL 数据库同步经济数据,从而在多个服务器之间共享。当玩家离开/断开服务器时,插件会将玩家的余额上传到 MySQL 数据库。当玩家加入服务器时,插件会检查 MySQL 数据库中是否有该玩家的账户,并将其同步到服务器经济系统。

📦 依赖

  • Vault - 下载
  • 任何与 Vault 兼容的经济系统
  • MySQL 数据库

🛠️ 安装说明

  1. 将插件放入服务器的 plugins 文件夹中。确保已安装经济系统和 Vault。
  2. 启动服务器以生成配置,然后停止服务器。
  3. 打开配置文件并设置数据库连接详细信息。你需要创建数据库,然后插件将自动创建表。
  4. 启动服务器。完成!你可以同步任意数量的服务器经济账户。

📜 配置示例


#MySQL Database details
database:
    mysql:
#MySQL server address
        host: 127.0.0.1
#MySQL server port (default 3306)
        port: 3306
#Database name (NOTE! You need to create the database, then the plugin will create the tables.)
        databaseName: 'mydatabase'
#Tables name (the plugin will auto create it)
        dataTableName: 'eco_accounts'
#User name
        user: 'admin'
#User password
        password: 'cheesecake' 
#SSL connection
        sslEnabled: false
#This maintenance task runs async with a 2 min delay after the server starts.
    removeOldAccounts:
 #Enable or disable database clean up of old accounts. | (true or false)
        enabled: false
#Inactivity in days. Default 60 days.
        inactivity: 60



#Other configurable options
General:
#Save online players accounts to database task. Disable this task and data will only be saved when the player disconnects.
    #To limit data loss in case the server crashes enable this saving task. It runs async so there will be no lag involved.
    saveDataTask:
#Enable or disable the data save task. | (true or false)
        enabled: true
#Time between data saves in minutes. | Default 3 min.
        interval: 3
#Hide the data save task log messages.
        hideLogMessages: false

⚠️ 注意事项

此插件不创建经济系统,它仅使用 Vault 来同步现有的经济系统到 MySQL 数据库。

🔗 源代码

源代码:https://github.com/brunyman/MysqlEconomyBridge.git