Essential-Commands
5bda9f51 - feat: RTP enhancements (make it work in the Nether!) (and more!) (#231)

Commit
2 years ago
feat: RTP enhancements (make it work in the Nether!) (and more!) (#231) new config option: - `rtp_enabled_worlds` - a list of world registry keys to allow `/rtp` in - Example: `rtp_enabled_worlds=[overworld,nether]` - This config option _can_ be reloaded with `/essentialcommands config reload` new permission: - `essentialcommands.bypass.randomteleport_cooldown`, defaultRequireLevel=4 lang file change: - `cmd.rtp.error.no_spawn_set` -> `cmd.rtp.error.world_not_enabled` - Old `en_us` text: "Not in Overworld." - New `en_us` text: "RTP is not enabled in the world '${0}'" --- * feat: RTP enhancements - code restructure * Lots (see desc) - thread Executor / pool for RTP workers - Worker thread exception handling (logging) - add HeightFinder/HeightFindingStrategy (and accept in RTP's `exec`) - Add ability to find valid RTP locations in the Nether (it's pretty quick, too!) * doc comment HeightFinder * more internal rtp reorg * some checkstyle * rm unused method: RandomTeleportCommand.isValidSpawnPosition * use PlayerData.access * Address TODO: Add OP/Permission bypass for RTP cooldown * use world.getTopY() in place of world.getHeight() for `maxY` set in `findRtpPosition` and `TopCommand.calculateMaxY` * pass down bounds in ctx instead of threadlocal * rm addressed todo * Add `RTP_ENABLED_WORLDS` config option. absolutely insane how complicated it is to interface with the worlds list * update "Ladysnake Mods" repository configuration (PlayerAbilityLib) (fixes build failure) * lang file change: `cmd.rtp.error.no_spawn_set` -> `cmd.rtp.error.world_not_enabled` (and fix newly-introduced inverted-condition bug) * log at level "warn" instead of "error" for invalid config value
Author
Committer
Parents
Loading