SweetFlight
一款用于限时飞行的 Minecraft 插件。
默认配置为中文。如需英文或其他语言,请查看 localization 仓库。
简介
本插件可合理限制玩家每日的飞行时间。
- 你可以为玩家设置基础每日飞行时间,该时间将在每天指定时间自动重置。
- 你还可以通过指令给予玩家额外的飞行时间,让他们兑换更多的飞行时长。
不同飞行组(groups.yml)的玩家拥有不同的基础每日飞行时间。支持叠加飞行时间。以默认配置为例:
default 飞行组拥有 5m 飞行时间。
vip 飞行组拥有 +1h 飞行时间。
如果一名玩家同时拥有 default 和 vip 组的权限,其基础飞行时间将为 1小时5分钟。
当玩家飞行时,将优先消耗额外飞行时间。只有当额外飞行时间耗尽后,才会消耗每日基础飞行时间。
这种消耗机制可以防止玩家囤积过多的额外飞行时间。当然,如有需要,你也可以在配置文件中修改飞行时间的消耗优先级。
兼容性
本插件目前兼容以下插件:
- Residence -- 支持区域标志。在带有
nofly 标志的区域禁用飞行,在带有 fly 标志的区域启用无限飞行。
- Dominion -- 支持区域标志。在没有
fly 标志的区域禁用飞行。
想要添加更多插件兼容性?请参考 ResidenceSupport.java 并向本插件提交 Pull Request!
⚠️警告
Dominion 默认配置中的飞行控制行为会破坏大多数飞行管理插件,即使玩家不在插件区域内也是如此!请确保你在 Dominion 配置中正确设置了 fly-permission-nodes。
指令
根指令:/sweetflight
别名:/sweetfly, /sflight, /sfly, /sf
被 < > 包裹的参数为必填;被 [ ] 包裹的参数为可选。
玩家指令
| 指令 |
描述 |
权限 |
/sf toggle |
切换飞行模式 |
sweet.flight.toggle |
/sf on |
启用飞行 |
sweet.flight.toggle |
/sf off |
禁用飞行 |
sweet.flight.toggle |
/sf check |
查看当前飞行组和可用飞行时间 |
sweet.flight.check |
管理员指令
| 指令 |
描述 |
权限 |
/sf toggle [player] |
为自己或另一名玩家切换飞行模式 |
sweet.flight.toggle.other |
/sf on [player] |
为自己或另一名玩家启用飞行 |
sweet.flight.toggle.other |
/sf off [player] |
为自己或另一名玩家禁用飞行 |
sweet.flight.toggle.other |
/sf check [player] |
查看自己或另一名玩家的飞行组和可用时间 |
sweet.flight.check.other |
/sf reset <player> |
重置玩家当天的基础飞行时间 |
OP/Console |
/sf set <player> <time> |
设置玩家的额外飞行时间 |
OP/Console |
/sf add <player> <time> |
为玩家增加额外飞行时间 |
OP/Console |
/sf reload database |
重新连接数据库 |
OP/Console |
/sf reload |
重载插件配置 |
OP/Console |
时间格式说明
指令中使用的时间格式为 数值 + 单位。可用单位:h (小时), m (分钟), s (秒)。示例:
1m – 一分钟
2h3m – 两小时三分钟
4h5m6s – 四小时五分钟六秒
占位符
本插件为 PlaceholderAPI 注册了以下占位符:
%sweetflight_standard_time% 玩家每日基础飞行时间(格式化)
%sweetflight_standard_time_seconds% 玩家每日基础飞行时间(秒)
%sweetflight_status_time% 玩家剩余基础飞行时间(格式化)
%sweetflight_status_time_seconds% 玩家剩余基础飞行时间(秒)
%sweetflight_extra_time% 玩家剩余额外飞行时间(格式化)
%sweetflight_extra_time_seconds% 玩家剩余额外飞行时间(秒)
%sweetflight_time% 玩家总剩余飞行时间(格式化)
%sweetflight_time_seconds% 玩家总剩余飞行时间(秒)
开发者

repositories {
maven("https://jitpack.io/")
}
dependencies {
compileOnly("com.github.MrXiaoM:SweetFlight:$VERSION")
}
SweetFlight
A Minecraft plugin for timed flight.
Default configurations are in Chinese. Check localization repository for English or other language.
Introduction
This plugin can properly limit players' daily flight time.
- You can set a base daily flight time for players, which will be automatically reset at a specified time every day.
- You can also give players extra flight time via commands, allowing them to redeem more flight time.
Players in different flight groups (groups.yml) have different base daily flight times. Stackable flight time is supported. Using the default configuration as an example:
- The
default flight group has 5m flight time.
- The
vip flight group has +1h flight time.
If a player has permissions for both default and vip groups, their base flight time will be 1 hour and 5 minutes.
When a player is flying, extra flight time will be consumed first. Only when extra flight time is exhausted will daily base flight time be consumed.
This consumption mechanism prevents players from hoarding excessive extra flight time. Of course, you can modify the flight time consumption priority in the config if needed.
Compatibility
This plugin is currently compatible with:
- Residence -- Supports zone flags. Flight is disabled in zones with
nofly flag and unlimited flight is enabled in zones with fly flag.
- Dominion -- Supports zone flags. Flight is disabled in zones without
fly flag.
Want to add more plugin compatibility? Refer to ResidenceSupport.java and submit a Pull Request to this plugin!
⚠️WARNING
The flight control behavior in Dominion's default configuration breaks most flight management plugins, even when the player is not inside a plugin zone! Please make sure you have properly configured fly-permission-nodes in the Dominion config.
Commands
Root command: /sweetflight
Aliases: /sweetfly, /sflight, /sfly, /sf
Parameters wrapped in <> are required; parameters wrapped in [] are optional.
Player Commands
| Command |
Description |
Permission |
/sf toggle |
Toggle flight mode |
sweet.flight.toggle |
/sf on |
Enable flight |
sweet.flight.toggle |
/sf off |
Disable flight |
sweet.flight.toggle |
/sf check |
View current flight group and available flight time |
sweet.flight.check |
Admin Commands
| Command |
Description |
Permission |
/sf toggle [player] |
Toggle flight mode for yourself or another player |
sweet.flight.toggle.other |
/sf on [player] |
Enable flight for yourself or another player |
sweet.flight.toggle.other |
/sf off [player] |
Disable flight for yourself or another player |
sweet.flight.toggle.other |
/sf check [player] |
View flight group and available time for yourself or another player |
sweet.flight.check.other |
/sf reset <player> |
Reset the player's today base flight time |
OP/Console |
/sf set <player> <time> |
Set the player's extra flight time |
OP/Console |
/sf add <player> <time> |
Add extra flight time to the player |
OP/Console |
/sf reload database |
Reconnect to the database |
OP/Console |
/sf reload |
Reload plugin configuration |
OP/Console |
Time Format Explanation
The time format used in commands is value + unit. Available units: h (hour), m (minute), s (second). Examples:
1m – one minute
2h3m – two hours and three minutes
4h5m6s – four hours, five minutes and six seconds
Placeholders
This plugin registers the following placeholders for PlaceholderAPI:
%sweetflight_standard_time% Player's daily base flight time (formatted)
%sweetflight_standard_time_seconds% Player's daily base flight time (seconds)
%sweetflight_status_time% Player's remaining base flight time (formatted)
%sweetflight_status_time_seconds% Player's remaining base flight time (seconds)
%sweetflight_extra_time% Player's remaining extra flight time (formatted)
%sweetflight_extra_time_seconds% Player's remaining extra flight time (seconds)
%sweetflight_time% Player's total remaining flight time (formatted)
%sweetflight_time_seconds% Player's total remaining flight time (seconds)
Developer

repositories {
maven("https://jitpack.io/")
}
dependencies {
compileOnly("com.github.MrXiaoM:SweetFlight:$VERSION")
}
评论 0
登录后参与评分
还没有评论,来抢沙发吧