Skip to content

FakePlayer-CE.Build16

Latest

Choose a tag to compare

@EndlessPixel EndlessPixel released this 31 Oct 01:40
· 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_distance option: give a fake player its own chunk radius. Set the default under default-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>. -1 keeps the world setting. Useful for keeping a distant afk fake player's chunks ticking without raising the whole server's simulation distance.
  • New /fp aichat command. 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 separate ai-chat.yml — endpoint, key or environment variable, model, sampling, context length, prompts and interval — so config.yml stays untouched.
  • /fp aichat follows the conversation. With recent-chat-lines set, 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, then chance and cooldown-seconds keep the token bill down. Continuous mode still exists but stays off unless allow-continuous is enabled.
  • HTTP Admin API: /aichat endpoints. GET /aichat?name=&mode=public|private&target=&continuous=true&interval= and GET /aichat/stop?name= drive the same feature remotely, each gated by http-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 permission fakeplayer.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: false restores the old behaviour.
  • New death-message option. With kick-on-dead enabled the death event is cancelled, so no death message ever appeared; set death-message: true to broadcast it anyway.

Breaking Changes

  • config.yml version 28 → 32. Three new options: simulation_distance (in default-features), death-message, advancements. Existing files keep working; the template config.tmpl.yml is regenerated so you can diff new keys.
  • advancements defaults to true. Servers upgrading from build15 will start seeing fake players make advancements in chat. Add advancements: false if that noise is not wanted.
  • New permission fakeplayer.command.spawn.uuid (default op).
  • New file ai-chat.yml, created on first start; /fp aichat stays unusable until enabled: true and a key are configured.

Critical Fixes

  • Restored fake players no longer doing anything. With restore-on-start a 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 set values 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.txt gained 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 respawn reapplies its whole snapshot, features included.
  • /fp aichat needs 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


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

鸣谢