Repository navigation
FakePlayer-CE.Build21
Cross-origin panels, self-updating, and the crash that made build20 unusable for some of you
This build is mostly about the admin API and updates: it can now answer a web panel on another host, download its own next jar, and survive a broken certificate chain. It also fixes the build20 startup crash reported in #150, and two long-standing fake player behaviours.
Highlights
- The HTTP admin API can serve cross-origin requests. Off by default: with
http-admin.cors.enabled: falsenoAccess-Control-*header is sent and browsers block cross-origin calls exactly as before. Turning it on with a list ofallowed-origins(or*) makes the API answer preflights and echo the origin, so a panel served from another host can call it; origins outside the list still get403. - Updates can be downloaded automatically (opt-in). With
update-download: truethe plugin fetches the new jar from the release page intoplugins/update; Paper-family cores swap it in on the next restart, so updating becomes "download, restart". The periodic check does the same, so an idle server stays one restart away from the latest build. Off by default, and a warning is logged when the core does not process that folder. - Update checks and downloads can skip certificate validation. Some mirrors and proxies serve an incomplete chain, which made both fail with
PKIX path building failedand left no way around it.update-ignore-ssl-errors: trueskips CA and hostname checks for these requests only; it is off by default because it also removes the protection against a man-in-the-middle.
Critical Fixes
- Fixed the plugin refusing to enable with CommandAPI 12.1.0 (#150). The optional
forceargument of/fp renamewas created with a node name but no literal, which 12.1.0 rejects withBadLiteralExceptionwhile registering commands — every/fpcommand was gone and the plugin was disabled at startup. The literal is passed properly now. - Fake players can be hit and take damage. They never send the "client loaded" packet a real client sends, and vanilla treats a player whose client has not loaded as invulnerable, so even with invulnerability off they could not be damaged. The fake connection now reports itself as loaded, on 26.1+ and, explicitly, on 1.21.9.
- AI chat replies no longer leak Markdown. Models answer in Markdown and the chat box renders it literally, so
**,###and fences showed up as noise. Replies are converted now: bold / italic / strikethrough / inline code get the matching styles, headings turn bold, list markers become•, code fences and horizontal rules are dropped, and links become clickable text.
Breaking Changes
- None in behaviour.
config.ymlis now version 38 because of the three new update options; existing files upgrade automatically on start.
Important Notes
/fp renameand theplugins/updatefolder are the only new surfaces here. The rename command landed in build20; this build only fixes itsforceargument.- 1.21.11 has no "client loaded" hook yet, so fake players on that version still cannot be damaged. 1.20.x never simulated damage and is unchanged.
update-ignore-ssl-errorsreally does remove MITM protection. Only enable it when a mirror or proxy you trust has a broken chain.
Usage
- Java: 25+ (required)
- Server: Paper / Leaf / Purpur 1.20.1+ (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
- @TheCreateorGH (#150: the CommandAPI 12.1.0 startup crash, with a stack trace that pointed straight at the line)
- CraftAmethyst/fakeplayer-QM, commit
b9a498c3(marking the fake connection as client-loaded so fake players can be damaged)
FakePlayer-CE.Build21 —— 跨域面板、自动更新,以及让 build20 对部分人完全不可用的那个崩溃
这个版本主要在管理接口和更新上:现在能回应部署在别的主机的面板、能自己把下个版本的 jar 下回来、也能在证书链有问题时绕过去。同时修掉了 #150 报告的 build20 启动崩溃,以及两个长期存在的假人行为问题。
核心特性
- HTTP 管理接口支持跨域请求。 默认关闭:
http-admin.cors.enabled: false时不返回任何Access-Control-*响应头,浏览器照旧拦住跨域调用。开启并在allowed-origins里列出面板来源(或写*)后,接口会应答预检请求并回显来源;不在名单里的来源仍返回403。 - 更新包可以自动下载(默认关闭)。 打开
update-download后,插件会把新版 jar 下载到plugins/update,Paper 系核心会在下次启动时自动替换,更新流程变成「下载 + 重启」。定时检查同样会下载,长期不重启的服务器也只是差一次重启。默认关闭;核心不处理该目录时会输出警告。 - 更新检查与下载可以跳过证书校验。 部分镜像 / 代理的证书链不完整,检查与下载都会直接报
PKIX path building failed,且没有绕开的办法。update-ignore-ssl-errors: true只对这两个请求跳过 CA 与主机名校验,默认关闭——它同时去掉了对中间人攻击的防护。
关键修复
- 修复 CommandAPI 12.1.0 下插件无法启用(#150)。
/fp rename的可选force参数只传了节点名、没有传字面量,12.1.0 在注册命令时直接抛BadLiteralException,导致插件在启动阶段就被禁用、所有/fp命令消失。现在按正确方式传入字面量。 - 假人现在可以被攻击、会掉血。 假人不会发送真实客户端那个「已加载」数据包,而原版把客户端尚未加载的玩家当作无敌,所以即使关掉无敌也打不掉血。现在假人连接会主动报告已加载(26.1+ 与 1.21.9)。
- AI 回复不再把 Markdown 原样吐进聊天栏。 模型按 Markdown 回答,而聊天栏只当普通文字渲染,
**、###、代码围栏全成了噪声。现在会做转换:加粗 / 斜体 / 删除线 / 行内代码映射成对应样式,标题转加粗,列表转•,代码围栏与分隔线直接去掉,链接变成可点击文字。
破坏性变更
- 行为上没有。 由于新增了三个更新相关配置项,
config.yml版本提升至 38;现有配置文件启动时自动升级。
重要说明
- 这次新增的只有
/fp rename的修复与plugins/update目录。 重命名命令本身是 build20 加的,这个版本只修它的force参数。 - 1.21.11 还没有「客户端已加载」的钩子,该版本的假人仍然打不掉血;1.20.x 本来就没有模拟伤害,行为不变。
update-ignore-ssl-errors真的会去掉中间人防护。 只在你信任、且证书链确实坏掉的镜像 / 代理前面打开。
使用要求
- Java:25+(必需)
- 服务端:Paper / Leaf / Purpur 1.20.1+(支持 Folia)
- API:CommandAPI 12.0.0+(Minecraft 26.3 需要 12.1.0+)
- 可选:SkinsRestorer(正版皮肤)、AuthMe / CatSeedLogin / LibreLogin(登录插件豁免)、PlaceholderAPI
鸣谢
- CE 维护:@EndlessPixel
- @TheCreateorGH(#150:CommandAPI 12.1.0 下的启动崩溃,堆栈直接指到了出问题的那一行)
- CraftAmethyst/fakeplayer-QM 提交
b9a498c3(标记假人连接已加载,使其可被伤害)