Skip to content

FakePlayer-CE.Build23

Latest

Choose a tag to compare

@EndlessPixel EndlessPixel released this 28 Nov 17:11
· 20 commits to master since this release

FakePlayer-CE.Build23

Per-permission limits, a JSON spawn command, multi-model AI, and a smaller jar

This build focuses on giving server owners finer control: fake-player caps can now be raised by permission, spawning can be described with one JSON argument, and AI chat can switch between configured models. Undertow and the MySQL driver are no longer bundled, so the jar is much smaller.

Highlights

  • Per-permission fake-player limits (#187, #64). player-limit stays the default. Add spawn-limit entries such as vip: 10 and grant fakeplayer.spawn.limit.vip; when several nodes match, the highest value wins. OPs are not limited, and dynamic TPS limits now respect each player's own cap. config.yml is version 42.
  • New /fp spawnjson for advanced spawning. name, uuid, world, x/y/z, yaw/pitch and lifespan_seconds can be combined in one JSON argument. Unknown fields are rejected so typos do not silently do nothing. /fp spawnuuid is deprecated; NBT is deliberately not included yet.
  • AI chat supports multiple models. Define named models under models: in ai-chat.yml, each with its own endpoint and key, and pick the default with active-model. OPs can switch at runtime with /fp aichat model <name>; the choice is saved. Existing configs keep working as a single implicit default model.
  • AI chat can optionally use inventory context. inventory-context.fakeplayer / inventory-context.questioner in ai-chat.yml, together with the matching per-player switches (aichat_fake_inventory, aichat_questioner_inventory, via /fp config set), add item types and counts to the prompt. Both switches are off by default; config.yml is version 41.
  • -a now works on every name-based command (#123, #202). OP/console apply it to all fake players, regular players only to their own. select, spawn/spawnuuid and rename are excluded; kick/kill keep their existing multi-target behavior.
  • New name-suffix option (#144). Custom and generated names can carry a suffix as well as a prefix. Generated names put the sequence number before the suffix (Bot_1_bot); config.yml is version 40.
  • Optional libraries are no longer bundled. Undertow and the MySQL driver are downloaded on demand into plugins/FakePlayer-CE/libs when HTTP admin or MySQL is enabled. Set -DLeaf.library-download-repo=<url> to choose a Maven mirror (default: Maven Central). Only http(s) URLs are accepted and downloads stay inside libs.

Breaking Changes

  • No behaviour-breaking changes. /fp spawnuuid is deprecated in favour of /fp spawnjson, but still works. config.yml reaches version 42 because of the three new options; existing files keep working and can be upgraded with /fp update config.

Critical Fixes

  • /fp spawn resolves world names and reports permission errors properly (thanks @boxendo, eb443564). World arguments are resolved by Bukkit world name (dimension keys still work). Missing spawn.name / spawn.location permissions now produce explicit messages.
  • /fp selection used the wrong permission, and world-only spawning ignored the world (thanks @boxendo, c436b5cf). /fp spawn <name> <world> now respects the world, and - skips the name argument for players without spawn.name.
  • Fake players are no longer removed twice on 1.21.x (thanks @NotCbop / Cbop and co-author Claude Fable 5, 6aaf570). On 1.21.11, Player.kick() already completed the fake player's disconnect path; the follow-up PlayerList.remove fired a second PlayerQuitEvent, threw IllegalStateException: Already retired and left ghost bots that /fp kick could never remove. Removal now runs only when the player is still online after the kick.

Important Notes

  • Enabling HTTP admin or MySQL triggers a one-time dependency download at startup. If your server cannot reach Maven Central, set -DLeaf.library-download-repo=<url> before starting.
  • AI inventory context is off by default and needs both the global switch and the player's personal switch.
  • /fp version reports the CI commit that produced this jar (5a391559). The GitHub tag points at the changelog commit; the difference is a documentation-only commit.

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, AuthMe / CatSeedLogin / LibreLogin, PlaceholderAPI

Credits


FakePlayer-CE.Build23 —— 按权限设上限、JSON 召唤、多模型 AI 与更小的 jar

这个版本把控制权交得更细:可以按权限提高假人数量上限,用一条 JSON 参数描述高级召唤,AI 聊天也能在多个已配置模型间切换。Undertow 与 MySQL 驱动不再打包进 jar,产物体积明显变小。

亮点

  • 按权限设置假人数量上限(#187、#64)。 player-limit 仍是默认值;在 spawn-limit 中配置如 vip: 10 并授予 fakeplayer.spawn.limit.vip,命中多个权限时取最大值。OP 不受限,动态 TPS 上限也会按玩家实际额度扣减。config.yml 版本为 42。
  • 新增 /fp spawnjson。 name、uuid、world、x/y/z、yaw/pitch、lifespan_seconds 可自由组合在一个 JSON 参数里;未知字段直接报错,避免拼错后静默失效。/fp spawnuuid 弃用,NBT 暂不支持。
  • AI 聊天支持多模型。 ai-chat.yml 的 models 可定义多个具名模型,各自独立接口与密钥,active-model 指定默认;OP 可用 /fp aichat model <名称> 运行时切换并保存。旧配置仍按单个 default 模型工作。
  • AI 聊天可选择性读取背包上下文。 ai-chat.yml 的 inventory-context.fakeplayer / inventory-context.questioner 与玩家开关 aichat_fake_inventory / aichat_questioner_inventory(/fp config set)同时开启时,背包物品种类与数量进入提示词。默认全部关闭,config.yml 版本为 41。
  • -a 支持所有名称类命令(#123、#202)。 OP/控制台作用于全服,普通玩家仅限自己召唤的;select、spawn/spawnuuid、rename 除外,kick/kill 保持原有批量行为。
  • 新增 name-suffix(#144)。 自定义与自动生成的名字都可以带后缀;自动生成时序号放在后缀之前(Bot_1_bot)。config.yml 版本为 40。
  • 可选依赖不再打包进 jar。 开启 HTTP 接口或 MySQL 时,Undertow 与 MySQL 驱动按需下载到 plugins/FakePlayer-CE/libs。可用 -DLeaf.library-download-repo=<url> 指定镜像源(默认 Maven 中央仓库);仅接受 http(s) 地址,下载路径限制在 libs 内。

破坏性变更

  • 行为上没有。 /fp spawnuuid 弃用但仍可用,推荐改用 /fp spawnjson。config.yml 因三个新选项提升到版本 42,现有配置继续工作,可用 /fp update config 补齐。

关键修复

  • /fp spawn 世界名与权限报错修复(感谢 @boxendo,eb443564)。 世界参数按 Bukkit 世界名解析(兼容维度 key);缺少 spawn.name / spawn.location 权限时给出明确提示。
  • /fp selection 权限与只给世界时的召唤修复(感谢 @boxendo,c436b5cf)。 /fp spawn <名> <世界> 现在尊重世界参数,- 可跳过名字参数。
  • 1.21.x 上假人不再被重复移除(感谢 @NotCbop / Cbop,共同作者 Claude Fable 5,6aaf570)。 1.21.11 上 Player.kick() 已走完断线流程,随后的 PlayerList.remove 会二次触发 PlayerQuitEvent 并留下 /fp kick 删不掉的幽灵假人。现在仅在 kick 后仍在线时才做兜底移除。

注意

  • 首次开启 HTTP 接口或 MySQL 会在启动时下载依赖。若服务器无法访问 Maven Central,请在启动前设置 -DLeaf.library-download-repo=<url>。
  • AI 背包上下文默认关闭,且需要全局开关与玩家个人开关同时打开。
  • /fp version 显示的是产出该 jar 的 CI commit(本包为 5a391559),GitHub tag 指向的是更新日志提交,两者只差一个纯文档提交。

使用

  • 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

致谢