
SweetFlight
A daily flight time/energy manager to limit player flying ability.
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
defaultflight group has5mflight time. - The
vipflight group has+1hflight 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
noflyflag and unlimited flight is enabled in zones withflyflag. - Dominion -- Supports zone flags. Flight is disabled in zones without
flyflag.
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-nodesin 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 minute2h3m– two hours and three minutes4h5m6s– 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")
}
