WorldGuard Custom Flags
作者:Karthuix
发布时间:2016年8月24日
原生版本:未知
测试支持:1.8,1.9,1.10
WorldGuard自定义标志允许建模者在WorldGuard区域创建、设置和获取自定义标志
点此下载插件详细介绍
WorldGuard Custom Flags 插件允许开发者在 WorldGuard 区域上创建、设置和获取自定义 Flag。用户只需在其他插件需要时下载此插件,它本身不执行任何操作。
🚩 WorldGuard Custom Flags
⚙️ 设置
要设置 WorldGuard Custom Flags,只需将 jar 文件拖放到 "plugins" 文件夹中。如果 WorldGuard 使用数据库,您有两种选择:
💾 强制 WG Custom Flags 使用文件存储
如果您不希望 WG Custom Flags 使用数据库,请按照以下步骤操作:
- 将 jar 文件放入 "plugins" 文件夹后,启动服务器一次。
- 忽略由此产生的错误消息。
- 停止服务器。
- 进入 "plugins/WGCustomFlags" 并编辑 "config.yml"。
- 将 "save-handler" 属性更改为 "flat" 以强制使用文件存储。
- 再次启动服务器,插件将使用文件存储。
🗄️ 设置数据库
如果您希望 WG Custom Flags 使用 WorldGuard 数据库,只需将 sql 文件导入到您的数据库中。
- 如果您使用 MySQL 和 PhpMyAdmin,可以直接使用 PhpMyAdmin Web 界面导入文件。
- 如果您使用 MySQL 但没有 PhpMyAdmin,您必须将文件上传到您的服务器并执行:
mysql -u root -p database < worldflags.sql
当然,您需要将 "root" 替换为您的数据库用户。执行命令后,您需要输入密码。
📜 命令
/flags [-d|-i <flag>]
/flags列出所有自定义 Flag。/flags -d列出所有 Flag(包括默认 Flag)。/flags -i <flag>显示有关 Flag 的信息。
🔑 权限
wgcustomflags.flags- 默认:OP 允许
- 限制
/flags命令的使用。
🧑💻 开发者信息
WG Custom Flags 支持以下 Flag 类型:
- BooleanFlag
- CommandStringFlag
- DoubleFlag
- EntityTypeFlag
- EnumFlag
- IntegerFlag
- LocationFlag (最好使用 CustomLocationFlag,如果 WorldGuard 使用数据库,它不会产生错误消息)
- SetFlag (最好使用 CustomSetFlag)
- StateFlag
🐛 问题?
如果您对此插件有疑问,请使用 Discussion 选项卡,如果您认为存在错误,请提交问题。
⚙️ 配置示例 (config.yml)
# Configuration file for WGCustomFlags
#
# This file includes all possible settings.
# You don't have to copy the whole file, just the settings you want to change.
# The saving method
# flat: saves the data in a flat file
# database: saves the data in the WorldGuard database (requires manual table creation!)
save-handler: "flat"
# if you want to use the database saving method you need to specify the table prefix
# DO NOT CHANGE THIS IF YOU SHARE THE DATABASE WITH WORLDGUARD!
table-prefix: "worldguard_"
# auto-migrate from flat file to database
# if you want to migrate you have to set save-handler to database first
# possible values:
# - false: no migration
# - true: migrate if flat file exists
# - force: always migrate
auto-migrate: false
# enable metrics
metrics: true