Repository navigation
FakePlayer-CE.Build18
·
85 commits
to master
since this release
FakePlayer-CE.Build18
Hotfix: build17 could not start — plus scheduled update checks
If you are on build17, upgrade now. build17 never registered /fakeplayer: one command was declared in a way CommandAPI rejects at registration time, so the plugin disabled itself on every server. There was no workaround — the whole command tree was gone. build18 fixes that and changes nothing else about fake player behaviour.
Critical Fixes
- Fixed the plugin failing to enable (build17 regression).
/fp gotohad gained astopsubcommand while keeping its optional[name]. CommandAPI appends a parent command's arguments in front of its subcommands, so the optional argument ended up before a required literal and registration threwOptionalArgumentException. Since that happened while registering the root command,/fakeplayerwas never registered at all. - Stopping a walk is now
/fp gotostop [name]. It could not stay undergoto: any command with an optional argument cannot carry subcommands, because the subcommand's literal is required./fp goto <location> [name]behaves exactly as before.
Highlights
- Update checks now repeat on a schedule.
check-for-updatesonly ran at startup, so a server that stayed up for weeks never noticed a new build. The newupdate-check-interval-hours(default24) sets the interval;0restores the old behaviour. The same new version is announced once, not on every round, and the check still only logs to the console.
Breaking Changes
config.ymlversion 33 → 34. One new option,update-check-interval-hours. Existing files keep working; the templateconfig.tmpl.ymlis regenerated so you can diff the new key./fp goto stopnever worked and is gone. Use/fp gotostop [name]. No other command changed.
Important Notes
- Changing the check interval needs a restart.
/fp reloadre-reads the value but does not rebuild the scheduled task; the comment inconfig.ymlsays so. - Update checks still need outbound HTTPS to
api.github.com. Servers without internet report the failure and nothing else is affected. - Repository changes: the whole codebase is now formatted with google-java-format and CI verifies it, plus a check that catches the CommandAPI argument-order mistake above before it can ship again.
Usage
- Java: 25+ (required)
- Server: Paper / Leaf 1.20.1+ (Purpur compatible; Folia supported)
- API: CommandAPI 12.0.0+ (Minecraft 26.3 requires 12.1.0+)
- Optional: SkinsRestorer (premium skins), AuthMe / CatSeedLogin / LibreLogin (login-plugin exemption), PlaceholderAPI
Credits
- CE maintenance: @EndlessPixel
- @lldxlzy (issue #130: reporting that build17 would not enable)
FakePlayer-CE.Build18 —— build17 的紧急修复,外加周期更新检查
如果你在用 build17,请立刻升级。 build17 里 /fakeplayer 根本没注册成功:有一条命令的写法会被 CommandAPI 在注册期拒绝,插件于是自我禁用。这没有任何绕过办法——整棵命令树都没了。build18 修掉这个问题,假人行为没有任何其它改动。
关键修复
- 修复插件无法启用(build17 回归)。
/fp goto在保留可选[name]的同时加了stop子命令。CommandAPI 会把父命令的参数拼在子命令之前,可选参数于是排到了必选字面量前面,注册期抛出OptionalArgumentException。因为这是注册根命令时发生的,/fakeplayer一个都没注册上。 - 中止寻路改为
/fp gotostop [假人]。 它没法继续留在goto下面:带可选参数的命令不能再挂子命令,因为子命令的字面量是必选参数。/fp goto <坐标> [假人]行为完全不变。
核心特性
- 更新检查改为周期执行。
check-for-updates原先只在开服时跑一次,长期不重启的服务器永远看不到新版本。新增update-check-interval-hours(默认24),设为0恢复旧行为。同一个新版本只提示一次,不会每轮刷日志,检查结果依旧只写控制台。
破坏性变更
config.yml版本 33 → 34。 新增一项update-check-interval-hours。现有配置照常可用;config.tmpl.yml会重新生成,便于对比新增项。/fp goto stop从未生效,现已移除。 请使用/fp gotostop [假人],其它命令没有变化。
重要说明
- 修改检查间隔需要重启。
/fp reload只会重读配置值,不会重建定时任务,config.yml的注释里已写明。 - 更新检查仍需要能出网 访问
api.github.com;没有外网的服务器会提示失败,不影响其它功能。 - 仓库侧改动: 全部源码改用 google-java-format 格式化并由 CI 校验;另外加了一个校验脚本,上面这种 CommandAPI 参数顺序错误在发布前就会被拦住。
使用要求
- Java:25+(必需)
- 服务端:Paper / Leaf 1.20.1+(兼容 Purpur;支持 Folia)
- API:CommandAPI 12.0.0+(Minecraft 26.3 需 12.1.0+)
- 可选集成:SkinsRestorer(正版皮肤)、AuthMe / CatSeedLogin / LibreLogin(登录插件 API 免登录)、PlaceholderAPI
鸣谢
- CE 维护:@EndlessPixel
- @lldxlzy(issue #130:报告 build17 无法启用)