Repository navigation
·
32 commits
to master
since this release
FakePlayer-CE.Build16
simulation_distance, /fp aichat with auto-reply, /fp spawnuuid & Real Advancements
This build is mostly about making fake players behave like players: they keep their own simulation distance, earn and announce advancements again, and can now talk through an OpenAI-compatible endpoint — either on a timer or only when someone says something worth answering. /fp spawnuuid spawns a fake player with a fixed UUID, restore-on-start finally brings back a fake player's per-player settings, and freshly spawned fake players are hittable immediately.
Highlights
- New
simulation_distanceoption: give a fake player its own chunk radius. Set the default underdefault-features, override per creator with/fp config set simulation_distance <n>, or change a single fake player live with/fp set <name> simulation_distance <n>.-1keeps the world setting. Useful for keeping a distant afk fake player's chunks ticking without raising the whole server's simulation distance. - New
/fp aichatcommand. Fake players generate lines through any OpenAI-compatible endpoint and either broadcast them (public) or whisper one player (private), once or continuously until/fp aichat stop. All settings live in a separateai-chat.yml— endpoint, key or environment variable, model, sampling, context length, prompts and interval — soconfig.ymlstays untouched. /fp aichatfollows the conversation. Withrecent-chat-linesset, the last N public chat lines are fed into the prompt, so a fake player can pick up what people are actually talking about.- Event-driven
auto-reply(recommended). Instead of talking on a timer, a fake player answers only when a player says something sensible: short messages, symbol-only messages and repeated spam are filtered first, thenchanceandcooldown-secondskeep the token bill down. Continuous mode still exists but stays off unlessallow-continuousis enabled. - HTTP Admin API:
/aichatendpoints.GET /aichat?name=&mode=public|private&target=&continuous=true&interval=andGET /aichat/stop?name=drive the same feature remotely, each gated byhttp-admin.interface.aichat. - New
/fp spawnuuid <name> <uuid> [world] [location]. Spawns a fake player with a specific UUID — handy when migrating from another fake-player plugin or keeping an external record in sync. Rejected when the name is already bound to a different UUID, when the UUID belongs to an online player, or when another fake player uses it. New permissionfakeplayer.command.spawn.uuid(default op). - Fake players earn and announce advancements again. Progress used to be suppressed entirely, which also broke advancement rewards, advancement-triggered functions and quest plugins. It now behaves like a real player;
advancements: falserestores the old behaviour. - New
death-messageoption. Withkick-on-deadenabled the death event is cancelled, so no death message ever appeared; setdeath-message: trueto broadcast it anyway.
Breaking Changes
config.ymlversion 28 → 32. Three new options:simulation_distance(indefault-features),death-message,advancements. Existing files keep working; the templateconfig.tmpl.ymlis regenerated so you can diff new keys.advancementsdefaults totrue. Servers upgrading from build15 will start seeing fake players make advancements in chat. Addadvancements: falseif that noise is not wanted.- New permission
fakeplayer.command.spawn.uuid(default op). - New file
ai-chat.yml, created on first start;/fp aichatstays unusable untilenabled: trueand a key are configured.
Critical Fixes
- Restored fake players no longer doing anything. With
restore-on-starta fake player came back online but its actions were gone, because only name, creator and position were persisted. The snapshot now also stores active actions — remaining executions, interval, message and pathfinding target — and re-applies them after respawn. /fp setvalues lost on restart. The same snapshot only knew about actions, so per-fake-player features fell back to the creator's defaults. Features (pickup_items,invulnerable,collidable,replenish,replace_tools,autofish,look_at_entity,wolverine,simulation_distance) are now read from the live fake player, snapshotted and replayed. Old snapshot files still parse.- Fake players immune for a few seconds after spawning. Since 1.21.11 the server keeps a player invulnerable until its client reports the world as loaded, and a fake player never answers. The plugin now marks it as loaded once the spawn teleport finishes, so damage lands immediately.
- Fake players vanishing without a "left the game" message. Newer server versions no longer broadcast it automatically on removal; it is now sent explicitly, so join and leave lines stay matched.
Important Notes
restore-fakeplayers.txtgained a field for feature values. Files from earlier builds are read fine, but features only start being recorded from this build — the first restore after upgrading still uses the creator's defaults.- Reviving a fake player with
/fp respawnreapplies its whole snapshot, features included. /fp aichatneeds an OpenAI-compatible endpoint; without a key it reports the missing environment variable instead of failing silently.- Enabling advancements means fake players now write advancement progress like any player. Servers that only want them for chunk loading can turn it off with
advancements: false.
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
- @tofo2 (issue #83:
simulation_distance; issue #103:/fp setlost on restart)
FakePlayer-CE.Build16 —— 模拟距离、AI 接话与真正的成就系统
这一版主要在「让假人更像玩家」:假人拥有自己的模拟距离,重新会达成并播报成就,还能通过 OpenAI 兼容接口说话——定时说,或只在有人说了值得回应的话时才接一句。另外新增 /fp spawnuuid 用固定 UUID 生成假人,restore-on-start 终于能把单个假人的配置一并带回来,刚生成的假人也能立刻受伤。
核心特性
- 新增
simulation_distance配置项:让假人拥有自己的区块半径。 在default-features里设全局默认,/fp config set simulation_distance <n>按创建者覆盖,/fp set <假人> simulation_distance <n>即时调整单个假人;-1沿用世界设置。适合让远处挂机的假人继续刻区块,而不必抬高整服模拟距离。 - 新增
/fp aichat命令。 假人可通过任意 OpenAI 兼容接口生成聊天内容,可发公共聊天(public)或私聊指定玩家(private),说一次或持续发言直到/fp aichat stop。全部设置独立放在ai-chat.yml(接口地址、密钥或环境变量、模型、采样参数、上下文长度、提示词与间隔),config.yml不受影响。 /fp aichat可以接话。 设置recent-chat-lines后,最近 N 条公共聊天会作为上下文传给模型,假人能够接着玩家正在聊的话题说。- 事件驱动的
auto-reply(推荐)。 不再靠定时器主动发话,只在玩家说了像样的话时才接一句:短消息、纯符号与重复刷屏会先被过滤,再由chance/cooldown-seconds控制频率以节省 token。continuous仍保留,但默认关闭,需要在ai-chat.yml打开allow-continuous。 - HTTP 管理接口新增
/aichat端点。GET /aichat?name=&mode=public|private&target=&continuous=true&interval=与GET /aichat/stop?name=远程驱动同一功能,各自受http-admin.interface.aichat控制。 - 新增
/fp spawnuuid <名称> <UUID> [世界] [坐标]。 用指定 UUID 生成假人,便于从其他假人插件迁移数据或与外部记录保持一致。名称已绑定其他 UUID、UUID 属于在线玩家、或已被其他假人占用时会拒绝。新增权限fakeplayer.command.spawn.uuid(默认 op)。 - 假人重新会达成并播报成就。 此前进度被完全屏蔽,连带进度奖励、进度触发函数与任务类插件全部失效。现在与真实玩家一致;设
advancements: false可恢复原行为。 - 新增
death-message配置项。 开启kick-on-dead时死亡事件会被取消,因此从不显示死亡消息;设为true即可照常广播。
破坏性变更
config.yml版本 28 → 32。 新增三项:simulation_distance(位于default-features)、death-message、advancements。现有配置继续有效;config.tmpl.yml会重新生成,便于对比新增项。advancements默认为true。 从 build15 升级的服务器会开始看到假人在聊天里达成成就。不想看到这些提示,加一行advancements: false。- 新增权限
fakeplayer.command.spawn.uuid(默认 op)。 - 新增
ai-chat.yml,首次启动生成;在填入enabled: true与密钥之前/fp aichat不可用。
关键修复
- 恢复后的假人不再执行任何动作。 开启
restore-on-start时假人虽然回来了,但动作全部丢失——之前只持久化了名称、创建者与位置。快照现在同时记录进行中的动作(剩余次数、间隔、消息与寻路目标),并在重生后重新应用。 /fp set的值在重启后丢失。 同一份快照原先只认识动作,单个假人的特性会回落到创建者默认值。现在特性(pickup_items、invulnerable、collidable、replenish、replace_tools、autofish、look_at_entity、wolverine、simulation_distance)会从在线假人读取、写入快照并在恢复后回放。旧快照文件仍可解析。- 假人出生后有几秒免疫伤害。 1.21.11 起服务端要等客户端上报「世界已加载」才允许受伤,而假人永远不会回应。现在生成传送完成后会替它标记为已加载,出生即可承伤。
- 假人被移除时不显示「离开了游戏」。 新版服务端不再自动广播该消息;现在移除时会补发,加入与离开的提示保持一致。
重要说明
restore-fakeplayers.txt增加了一段特性值。旧版本生成的文件仍能读取,但特性从本版本才开始记录——升级后的第一次恢复仍使用创建者默认值。/fp respawn复活假人时会回放整份快照,包含特性。/fp aichat需要 OpenAI 兼容接口;未配置密钥时会提示缺失的环境变量,而不是静默失败。- 开启成就后假人会像真实玩家一样写入进度数据。只想要区块常驻的服务器可以直接设
advancements: false。
使用要求
- 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
- @tofo2(issue #83:
simulation_distance;issue #103:/fp set重启丢失)