欢迎来到Minecraft插件百科!
对百科编辑一脸懵逼?
帮助:快速入门
带您快速熟悉百科编辑!
因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289
查看“Magic/Player Data Storage”的源代码
←
Magic/Player Data Storage
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于这些用户组的用户执行:
用户
、
自动确认用户
、
巡查者
您可以查看和复制此页面的源代码。
By default, Magic will store player data in plugins/Magic/data/players. Player data contains the classes and spells players have unlocked, SP earned, various stats, stored wands, undo queues (for engineering magic) and a host of other information. It is important to keep these backed up and safe! If you would prefer to store your player data in a database, Magic will easily let you do this! Magic can also migrate existing player data from the flatfile format, or from any store type to any other. See the [https://github.com/elBukkit/MagicPlugin/blob/master/Magic/src/main/resources/defaults/config/data_storage.yml default configs] here for examples. == Using the editor == Use <code>/mconfig editor config player_data_store</code> to edit the player data store configs, and add the following: == SQLite == <pre class="">player_data_store: class: SQLite database: players</pre> == MySQL == MySQL can also be used, this can be useful if you have servers on a Bungee (or other proxy) network and you want their magic data to stay in sync across all servers. Note you will probably also want to set up inventory syncing, which is not something Magic will do for you. All parameters are optional, though you will hopefully need to at least specify user and password. <pre class="">player_data_store: class: MySQL database: magic host: yourdatabaseserver port: 3306 user: minecraft password: somethingsecure</pre> == Postgres == <pre class="">player_data_store: class: PostresSQL database: magic host: localhost port: 3306 user: minecraft password: somethingsecure</pre> = Migrating Existing Player Data = If you already have player data (this happens as soon as players log in with the plugin installed) and you want to switch data storage, you can do so while easily migrating your data. It is ''recommended'' to turn on a server whitelist during this process, though it may not be necessary. It is '''''strongly''' recommended'' to backup your existing player data before migrating! In config.yml (or the editor) you would change your existing <code>player_data_store</code> block to <code>migrate_data_store</code>, like this: <pre class="">migrate_data_store: class: Yaml folder: data/players</pre> This block has the configuration of where your player data currently resides. The <code>player_data_store</code> block should contain your new player data configuration. Once this is set up, you should run the <code>/magic migrate</code> command to push the migration process through (or it will happen at next boot). After migration is complete you can remove the <code>migrate_data_store</code> config, using the same editor command as before.
返回
Magic/Player Data Storage
。
导航菜单
个人工具
登录
命名空间
页面
讨论
大陆简体
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
编辑相关
百科公告
编辑帮助
互助客栈
贡献分数
测试沙盒
发布条目
插件分类
管理
安全
聊天
编程
经济
修正
娱乐
综合
信息
机械
角色
传送
网页
整地
创世
付费
其它
工具
链入页面
相关更改
特殊页面
页面信息
相关网站
MCMOD百科
Minecraft中文百科
Minecraft纪念论坛
Minecraft百度贴吧
虚无世界Wiki