FlyCraft - 官方文档
概述
FlyCraft 是一款轻量且强大的 Minecraft 服务器飞行管理插件。它允许玩家切换飞行模式、调整飞行速度,并与 Discord 集成以实现远程管理。通过内置的性能指标、自动更新检查和 LuckPerms 权限集成,它为服务器提供了一套完整的飞行控制解决方案。
1. 核心功能
- 切换飞行模式 – 启用或禁用玩家的飞行功能
- 可配置的飞行时长 – 设置飞行时间限制
- 自定义冷却系统 – 防止频繁切换飞行状态
- 可调飞行速度 – 速度等级从 1(最慢)到 10(最快)
- 基于组的权限 – 支持组系统的权限管理,集成 LuckPerms
- 速度限制 – 为每个组设置最大允许速度
- 欢迎消息 – 向新玩家显示欢迎信息
- 完整的 Discord 集成 – 通过 Discord 命令管理飞行
- 更新检查器 – 自动检查版本更新
- Discord 通知 – 实时追踪飞行活动
- 多语言支持 –
lang/ 文件夹中提供专用的语言文件
- 新一代配置引擎 – 保留注释的自动化更新和迁移机制
- LuckPerms 集成 – 无缝的基于组的权限管理
- Folia 支持 – 全面支持 Folia 及现代服务器架构
2. 命令
2.1 游戏内命令
| 命令 |
描述 |
权限 |
别名 |
/fly [player] |
切换飞行模式 |
flycraft.use |
flymode |
/flyspeed <1-10> |
调整飞行速度 |
flycraft.flyspeed |
无 |
/flycraftreload |
重载插件配置 |
flycraft.reload |
fcr, flyreload |
注意:
- 使用
/fly [player] 需要额外的 flycraft.others 权限
/flyspeed 需要同时拥有 flycraft.flyspeed 和相应的 flycraft.maxflyspeed.<1-10> 权限
- 飞行速度可在 1(最慢)到 10(最快) 之间调整
- 玩家只能设置不超过其最大允许速度的速度值
2.2 Discord 命令
| 命令 |
描述 |
要求 |
!startfly <player> |
为指定玩家启用飞行 |
需要已配置的 Discord 角色 |
!stopfly <player> |
为指定玩家禁用飞行 |
需要已配置的 Discord 角色 |
!flyspeed <player> <1-10> |
设置玩家的飞行速度 |
需要已配置的 Discord 角色 |
3. 权限
3.1 基础权限
| 权限 |
描述 |
默认值 |
flycraft.use |
允许切换飞行模式 |
op |
flycraft.flyspeed |
允许更改飞行速度 |
op |
flycraft.flytime |
允许使用飞行时间相关命令 |
op |
flycraft.reload |
允许重载配置 |
op |
flycraft.others |
允许管理其他玩家的飞行 |
op |
3.2 速度控制权限
| 权限 |
描述 |
默认值 |
flycraft.maxflyspeed.1 |
允许设置最高飞行速度为 1 |
op |
flycraft.maxflyspeed.2 |
允许设置最高飞行速度为 2 |
op |
flycraft.maxflyspeed.3 |
允许设置最高飞行速度为 3 |
op |
flycraft.maxflyspeed.4 |
允许设置最高飞行速度为 4 |
op |
flycraft.maxflyspeed.5 |
允许设置最高飞行速度为 5 |
op |
flycraft.maxflyspeed.6 |
允许设置最高飞行速度为 6 |
op |
flycraft.maxflyspeed.7 |
允许设置最高飞行速度为 7 |
op |
flycraft.maxflyspeed.8 |
允许设置最高飞行速度为 8 |
op |
flycraft.maxflyspeed.9 |
允许设置最高飞行速度为 9 |
op |
flycraft.maxflyspeed.10 |
允许设置最高飞行速度为 10 |
op |
3.3 权限组
| 权限 |
描述 |
包含内容 |
flycraft.* |
授予所有 FlyCraft 权限 |
上述列出的所有权限 |
4. 权限系统
4.1 基础权限(适用于所有权限插件)
如果您使用的是除 LuckPerms 之外的任何权限插件(如 PermissionsEx、GroupManager 等),请使用以下基础权限来控制访问:
flycraft.use - 允许飞行
flycraft.flyspeed - 允许更改速度
flycraft.maxflyspeed.<1-10> - 设置最大允许速度
flycraft.others - 管理其他玩家
flycraft.reload - 重载配置
4.2 组系统(仅限 LuckPerms)
FlyCraft 包含一个强大的基于组的权限系统,仅与 LuckPerms 配合使用。当安装 LuckPerms 时,插件将根据玩家的 LuckPerms 组自动从 groups.yml 中读取组设置。如果未安装 LuckPerms,插件将回退使用基础权限系统。
4.1 组配置 (groups.yml)
groups:
default:
can-fly: false
max-fly-speed: 1
flight-duration: 300
flight-cooldown: 60
vip:
can-fly: true
max-fly-speed: 3
flight-duration: 600
flight-cooldown: 30
mvp:
can-fly: true
max-fly-speed: 5
flight-duration: 1200
flight-cooldown: 15
管理员:
can-fly: true
max-fly-speed: 10
flight-duration: -1
flight-cooldown: 0
4.2 组设置
| 设置项 |
描述 |
默认值 |
can-fly |
该组是否可以使用飞行功能 |
false |
max-fly-speed |
最大飞行速度 (1-10) |
1 |
flight-duration |
飞行持续时间(秒)(-1 表示无限) |
300 |
flight-cooldown |
两次飞行之间的冷却时间(秒) |
60 |
4.3 组系统特性 (仅限 LuckPerms)
- LuckPerms 集成: 自动检测玩家所属的组
- 继承权限: 支持 LuckPerms 的继承系统
- 组优先级: 使用主组,并回退到继承的组
- 默认组: 为没有特定组的玩家提供回退设置
重要提示: 组系统需要在您的服务器上安装并启用 LuckPerms。如果您使用的是其他权限插件,请使用第 4.1 节中描述的基本权限系统。
5. 配置文件 (config.yml)
4.1 常规设置
# 更新检查器设置
update-checker:
enabled: true
notify-ops: true
debug: false
# 语言设置
# lang/ 文件夹中的文件名 (例如,en_us 对应 en_us.yml)
language: "en_us"
# 飞行设置
flight-duration: 300 # 飞行持续时间(秒),默认值:300
flight-cooldown: 60 # 两次飞行之间的冷却时间(秒),默认值:60
welcome-message-enabled: true # 启用欢迎消息
4.2 Discord 集成
discord:
enabled: true
channel-id: "YOUR_CHANNEL_ID"
bot-token: "YOUR_BOT_TOKEN"
bot-settings:
status: "ONLINE" # ONLINE, IDLE, DO_NOT_DISTURB, INVISIBLE
activity:
type: "PLAYING" # PLAYING, WATCHING, LISTENING, COMPETING
message: "with %online_players% players"
commands:
enabled: true
prefix: "!"
allowed-roles:
- "ROLE_ID_1"
- "ROLE_ID_2"
embed:
enabled: true
color:
start: "#3498db"
end: "#e74c3c"
speed: "#f1c40f"
thumbnail:
enabled: true
url: "https://minotar.net/avatar/%player%/64"
footer:
text: "FlyCraft • %server_name%"
4.3 机器人活动设置
bot-activity:
type: PLAYING # 选项: PLAYING, WATCHING, LISTENING, COMPETING
message: "Flying on %server_name% with %online_players%/%max_players% online!"
8. Discord 特性
5.1 通知
- 开始/停止飞行的警报
- 速度变化更新
- 总飞行时间追踪
- 嵌入中包含玩家头像
5.2 消息格式
- 支持自定义表情符号
- 显示玩家名称和服务器信息
- 追踪飞行持续时间
6. 时间格式化
FlyCraft 自动格式化时间段以确保最大清晰度:
25 seconds
1 minute 30 seconds
2 hours 15 minutes 45 seconds
7. 多语言系统
FlyCraft 现在支持强大的多语言系统。所有面向用户的字符串都通过 plugins/FlyCraft/lang/ 目录中的专用文件处理。
7.1 关键特性
- 官方语言: 当插件进化时,官方文件(如
en_us.yml)会自动添加新键。
- 自定义语言: 您可以创建自己的语言文件(例如
fr_fr.yml)。这些文件受到保护,永远不会被插件的自动更新器覆盖或修改。
- 自动纠错: 如果自定义文件中缺少所需的键,插件将回退到默认英文值以防止错误。
7.2 更改语言
要更改插件的语言,请编辑 config.yml 中的 language 选项:
language: "es_es" # 这将查找 lang/es_es.yml
9. 依赖项
必需
- Minecraft Server: Spigot/Paper 1.16+
- JDA (Discord API):
5.0.0-beta.13
可选 (用于增强功能)
- PlaceholderAPI – 动态占位符支持
- Vault – 经济和权限支持
- DiscordSRV – 替代 Discord 集成
10. PlaceholderAPI 支持
FlyCraft 完全支持 PlaceholderAPI,允许您在计分板、聊天、标签页列表和菜单中显示飞行信息。
8.1 全局占位符
| 占位符 |
描述 |
%flycraft_flying_count% |
当前正在飞行的玩家数量 |
8.2 玩家占位符
| 占位符 |
描述 |
%flycraft_is_flying% |
返回 true 或 false |
%flycraft_status% |
返回 "Flying" 或 "Not Flying" |
%flycraft_time_left% |
剩余飞行时间(例如 "5m 30s")或 "Unlimited" |
%flycraft_can_fly% |
如果玩家有飞行权限则返回 true |
%flycraft_speed% |
当前飞行速度(例如 "1", "2") |
%flycraft_max_speed% |
玩家允许的最大飞行速度 |
%flycraft_cooldown% |
剩余冷却时间(例如 "30s")或 "Ready" |
%flycraft_group% |
根据组访问权限返回 "Authorized" 或 "Unauthorized" |
8.3 特定玩家占位符
将 <playername> 替换为目标玩家的名称。
| 占位符 |
描述 |
%flycraft_status_<playername>% |
特定玩家的飞行状态 |
%flycraft_cooldown_<playername>% |
特定玩家的冷却状态 |
%flycraft_max_speed_<playername>% |
特定玩家的最大速度 |
11. 技术特性
- 下一代迁移引擎 – 保留注释的自动化更新
- 自定义数据保护 – 在迁移过程中保留用户添加的组和条目
- 自动备份 – 在执行文件更新前创建
.old 文件
- 异步 Discord 消息传递 – 提升性能
- 安全重载处理 – 防止重载期间崩溃
- 自动冷却管理 – 确保公平的游戏体验
- 飞行时间追踪 – 监控玩家飞行持续时间
- 速度单位转换处理 – 在 Minecraft 速度单位之间进行转换
- 错误日志记录与处理 – 记录问题以便故障排除
- 基于事件架构 – 高效且模块化
12. 消息
所有消息均可在 lang/ 文件夹内的相关语言文件中进行自定义:
- 默认文件:
lang/en_us.yml
- 权限:缺少访问权限的错误消息
- 飞行状态:切换和过期警报
- Discord:命令和管理员警报
- 欢迎:加入消息
13. 安全功能
- 权限检查 – 确保玩家拥有正确的权限
- 输入验证 – 防止无效的命令参数
- 错误处理 – 优雅地捕获并记录问题
- 安全的 Discord 重连 – 防止机器人断开连接问题
- 冷却强制执行 – 防止垃圾信息滥用
- 飞行时长限制 – 确保平衡的游戏体验
- 速度范围限制 (1-10) – 防止意外行为
14. 开发信息
- API 版本: 1.16
- Java 版本: 21
- 构建系统: 基于 Maven
- 开源: 是
- 可扩展架构: 专为未来扩展而设计
安装指南
- 从官方仓库下载 FlyCraft v1.4。
- 将
.jar 文件放入服务器的 /plugins/ 文件夹中。
- 重启服务器以生成配置文件。
- 编辑
config.yml 以自定义设置。
- (可选)配置 Discord 机器人以实现远程飞行控制。
- 使用
/flycraftreload 重新加载插件或重启服务器。
支持
如需帮助、功能请求或 bug 报告:
- GitHub Issues – [链接到仓库]
- Discord 支持 – [邀请链接]
许可证
许可证
FlyCraft 是一个开源项目,根据 GNU 通用公共许可证 v3.0 (GPL-3.0) 授权。您可以自由使用、修改和分发它,但需满足以下条件:
- 必须适当注明原作者(Borhani)。
- 任何修改或重新分发的版本也必须采用 GPL-3.0 授权。
- 在项目的所有副本或实质部分中必须包含原始许可证。
有关完整许可证详情,请参阅:GNU GPL v3。
致谢
由 Aevorin Studios 开发。
FlyCraft - Official Documentation
Overview
FlyCraft is a lightweight and powerful flight management plugin for Minecraft servers. It allows players to toggle flight mode, adjust flight speed, and integrate with Discord for remote management. With built-in metrics, update checking, and LuckPerms integration, it provides a complete flight control solution for your server.
1. Core Features
- Toggle Flight Mode – Enable or disable flight for players
- Configurable Flight Duration – Set limits on flight time
- Customizable Cooldown System – Prevents excessive flight toggling
- Adjustable Fly Speed – Speed levels from 1 (slowest) to 10 (fastest)
- Group-Based Permissions – Group system with LuckPerms integration
- Automatic group detection
- Group-specific settings
- Inherited permissions support
- Speed Restrictions – Set maximum allowed speed per group
- Welcome Messages – Display a message to new players
- Full Discord Integration – Manage flights via Discord commands
- Update Checker – Automatic version checking
- Discord Notifications – Real-time flight activity tracking
- Multi-Language Support – Dedicated language files in
lang/ folder
- Next-Gen Config Engine – Comment-preserving automated updates and migrations
- LuckPerms Integration – Seamless group-based permission management
- Folia Support – Full support for Folia and modern server architectures
2. Commands
2.1 In-Game Commands
| Command |
Description |
Permission |
Aliases |
/fly [player] |
Toggle flying mode |
flycraft.use |
flymode |
/flyspeed <1-10> |
Adjust flying speed |
flycraft.flyspeed |
N/A |
/flycraftreload |
Reload the plugin configuration |
flycraft.reload |
fcr, flyreload |
Notes:
- Using
/fly [player] requires additional flycraft.others permission
/flyspeed requires both flycraft.flyspeed and appropriate flycraft.maxflyspeed.<1-10> permission
- Fly speed is adjustable from 1 (slowest) to 10 (fastest)
- Players can only set speeds up to their maximum allowed speed permission
2.2 Discord Commands
| Command |
Description |
Requirements |
!startfly <player> |
Enables flight for the specified player |
Requires configured Discord role |
!stopfly <player> |
Disables flight for the specified player |
Requires configured Discord role |
!flyspeed <player> <1-10> |
Sets the player’s flight speed |
Requires configured Discord role |
3. Permissions
3.1 Basic Permissions
| Permission |
Description |
Default |
flycraft.use |
Allows toggling flight mode |
op |
flycraft.flyspeed |
Allows changing flight speed |
op |
flycraft.flytime |
Allows using flight time commands |
op |
flycraft.reload |
Allows reloading the configuration |
op |
flycraft.others |
Allows managing flight for other players |
op |
3.2 Speed Control Permissions
| Permission |
Description |
Default |
flycraft.maxflyspeed.1 |
Allows setting fly speed up to 1 |
op |
flycraft.maxflyspeed.2 |
Allows setting fly speed up to 2 |
op |
flycraft.maxflyspeed.3 |
Allows setting fly speed up to 3 |
op |
flycraft.maxflyspeed.4 |
Allows setting fly speed up to 4 |
op |
flycraft.maxflyspeed.5 |
Allows setting fly speed up to 5 |
op |
flycraft.maxflyspeed.6 |
Allows setting fly speed up to 6 |
op |
flycraft.maxflyspeed.7 |
Allows setting fly speed up to 7 |
op |
flycraft.maxflyspeed.8 |
Allows setting fly speed up to 8 |
op |
flycraft.maxflyspeed.9 |
Allows setting fly speed up to 9 |
op |
flycraft.maxflyspeed.10 |
Allows setting fly speed up to 10 |
op |
3.3 Permission Groups
| Permission |
Description |
Includes |
flycraft.* |
Grants all FlyCraft permissions |
All permissions listed above |
4. Permission Systems
4.1 Basic Permissions (All Permission Plugins)
If you're using any permission plugin other than LuckPerms (like PermissionsEx, GroupManager, etc.), use these basic permissions to control access:
flycraft.use - Allow flight
flycraft.flyspeed - Allow speed changes
flycraft.maxflyspeed.<1-10> - Set maximum allowed speed
flycraft.others - Manage other players
flycraft.reload - Reload configuration
4.2 Group System (LuckPerms Only)
FlyCraft includes a powerful group-based permission system that works exclusively with LuckPerms. When LuckPerms is installed, the plugin will automatically use group settings from groups.yml based on the player's LuckPerms groups. If LuckPerms is not installed, the plugin will fall back to using the basic permission system.
4.1 Group Configuration (groups.yml)
groups:
default:
can-fly: false
max-fly-speed: 1
flight-duration: 300
flight-cooldown: 60
vip:
can-fly: true
max-fly-speed: 3
flight-duration: 600
flight-cooldown: 30
mvp:
can-fly: true
max-fly-speed: 5
flight-duration: 1200
flight-cooldown: 15
admin:
can-fly: true
max-fly-speed: 10
flight-duration: -1
flight-cooldown: 0
4.2 Group Settings
| Setting |
Description |
Default |
can-fly |
Whether the group can use flight |
false |
max-fly-speed |
Maximum flight speed (1-10) |
1 |
flight-duration |
Flight duration in seconds (-1 for unlimited) |
300 |
flight-cooldown |
Cooldown between flights in seconds |
60 |
4.3 Group System Features (LuckPerms Only)
- LuckPerms Integration: Automatically detects player groups
- Inherited Permissions: Support for LuckPerms inheritance system
- Group Priorities: Uses primary group with fallback to inherited groups
- Default Group: Fallback settings for players without a specific group
Important Note: The group system requires LuckPerms to be installed and enabled on your server. If you're using a different permission plugin, please use the basic permissions system described in section 4.1.
5. Configuration (config.yml)
4.1 General Settings
# Update Checker Settings
update-checker:
enabled: true
notify-ops: true
debug: false
# Language Settings
# The file name in the lang/ folder (e.g., en_us for en_us.yml)
language: "en_us"
# Flight Settings
flight-duration: 300 # Duration of flight in seconds (default: 300)
flight-cooldown: 60 # Cooldown time between flights (default: 60)
welcome-message-enabled: true # Enable welcome messages
4.2 Discord Integration
discord:
enabled: true
channel-id: "YOUR_CHANNEL_ID"
bot-token: "YOUR_BOT_TOKEN"
bot-settings:
status: "ONLINE" # ONLINE, IDLE, DO_NOT_DISTURB, INVISIBLE
activity:
type: "PLAYING" # PLAYING, WATCHING, LISTENING, COMPETING
message: "with %online_players% players"
commands:
enabled: true
prefix: "!"
allowed-roles:
- "ROLE_ID_1"
- "ROLE_ID_2"
embed:
enabled: true
color:
start: "#3498db"
end: "#e74c3c"
speed: "#f1c40f"
thumbnail:
enabled: true
url: "https://minotar.net/avatar/%player%/64"
footer:
text: "FlyCraft • %server_name%"
4.3 Bot Activity Settings
bot-activity:
type: PLAYING # Options: PLAYING, WATCHING, LISTENING, COMPETING
message: "Flying on %server_name% with %online_players%/%max_players% online!"
8. Discord Features
5.1 Notifications
- Flight start/stop alerts
- Speed change updates
- Total flight time tracking
- Player avatars included in embeds
5.2 Message Formatting
- Supports custom emojis
- Displays player names and server info
- Tracks flight duration
6. Time Formatting
FlyCraft automatically formats time periods for maximum clarity:
25 seconds
1 minute 30 seconds
2 hours 15 minutes 45 seconds
7. Multi-Language System
FlyCraft now supports a robust multi-language system. All user-facing strings are handled via dedicated files in the plugins/FlyCraft/lang/ directory.
7.1 Key Features
- Official Languages: Official files (like
en_us.yml) are automatically updated with new keys when the plugin evolves.
- Custom Languages: You can create your own language files (e.g.,
fr_fr.yml). These files are protected and will never be overwritten or modified by the plugin's auto-updater.
- Auto-Correction: If a required key is missing from a custom file, the plugin will fall back to the default English value to prevent errors.
7.2 Changing Language
To change the plugin's language, edit the language option in config.yml:
language: "es_es" # This will look for lang/es_es.yml
9. Dependencies
Required
- Minecraft Server: Spigot/Paper 1.16+
- JDA (Discord API):
5.0.0-beta.13
Optional (For Enhanced Features)
- PlaceholderAPI – Dynamic placeholders support
- Vault – Economy and permissions support
- DiscordSRV – Alternative Discord integration
10. PlaceholderAPI Support
FlyCraft fully supports PlaceholderAPI, allowing you to display flight information in scoreboards, chat, tab lists, and menus.
8.1 Global Placeholders
| Placeholder |
Description |
%flycraft_flying_count% |
Number of players currently flying |
8.2 Player Placeholders
| Placeholder |
Description |
%flycraft_is_flying% |
Returns true or false |
%flycraft_status% |
Returns "Flying" or "Not Flying" |
%flycraft_time_left% |
Remaining flight time (e.g., "5m 30s") or "Unlimited" |
%flycraft_can_fly% |
Returns true if player has permission to fly |
%flycraft_speed% |
Current flight speed (e.g., "1", "2") |
%flycraft_max_speed% |
Player's maximum allowed flight speed |
%flycraft_cooldown% |
Remaining cooldown time (e.g., "30s") or "Ready" |
%flycraft_group% |
Returns "Authorized" or "Unauthorized" based on group access |
8.3 Specific Player Placeholders
Replace <playername> with the name of the target player.
| Placeholder |
Description |
%flycraft_status_<playername>% |
Fly status of specific player |
%flycraft_cooldown_<playername>% |
Cooldown status of specific player |
%flycraft_max_speed_<playername>% |
Max speed of specific player |
11. Technical Features
- Next-Gen Migration Engine – Comment-preserving automated updates
- Custom Data Protection – Preserves user-added groups and entries during migration
- Automated Backups – Creates
.old files before performing file updates
- Async Discord Messaging – Improves performance
- Safe Reload Handling – Prevents crashes during reloads
- Automatic Cooldown Management – Ensures fair gameplay
- Flight Time Tracking – Monitors player flight duration
- Speed Conversion Handling – Converts between Minecraft speed units
- Error Logging & Handling – Logs issues for troubleshooting
- Event-Based Architecture – Efficient and modular
12. Messages
All messages are customizable in the relevant language file within the lang/ folder:
- Default file:
lang/en_us.yml
- Permissions: Error messages for missing access
- Flight Status: Toggling and expiration alerts
- Discord: Commands and admin alerts
- Welcome: Joining messages
13. Safety Features
- Permission Checks – Ensures players have the correct permissions
- Input Validation – Prevents invalid command arguments
- Error Handling – Captures and logs issues gracefully
- Safe Discord Reconnection – Prevents bot disconnection issues
- Cooldown Enforcement – Prevents spam abuse
- Flight Duration Limits – Ensures balanced gameplay
- Speed Range Limits (1-10) – Prevents unintended behavior
14. Development Information
- API Version: 1.16
- Java Version: 21
- Build System: Maven-based
- Open Source: Yes
- Extendable Architecture: Designed for future expansions
Installation Guide
- Download FlyCraft v1.4 from the official repository.
- Place the .jar file in your server’s
/plugins/ folder.
- Restart your server to generate configuration files.
- Edit
config.yml to customize settings.
- (Optional) Configure Discord Bot for remote flight control.
- Reload the plugin using
/flycraftreload or restart the server.
Support
For help, feature requests, or bug reports:
License
License
FlyCraft is an open-source project licensed under the GNU General Public License v3.0 (GPL-3.0). You are free to use, modify, and distribute it, provided that:
- Proper credit is given to the original author (Borhani).
- Any modifications or redistributed versions are also licensed under GPL-3.0.
- The original license is included in all copies or substantial portions of the project.
For full license details, see: GNU GPL v3.
Credits
Developed by Aevorin Studios.
评论 0
登录后参与评分
还没有评论,来抢沙发吧