Skip to content

FakePlayer-CE.Build8

Choose a tag to compare

@EndlessPixel EndlessPixel released this 11 Sep 10:53
· 136 commits to master since this release

FakePlayer-CE.Build8

Non-OP Fake Player Inventory Access, Real-Player Data Reuse & Stability Fixes

This release adds a global config (allow-non-op-open-inv) letting non-OP players open fake player inventories (with a no-permission hint), introduces a fakeplayer.command.spawn.name.force-real permission to spawn a fake player reusing a real player's data when the name is taken, and bundles several stability fixes (auto-replenish after item use, lag-level concurrency, empty fp say message, etc.). It inherits all Build7 chat and fp say overhaul fixes.

Highlights

  • Non-OP inventory access: new global config allow-non-op-open-inv (default false). When enabled, any player can open a fake player's inventory via right-click or /fp invsee. Opening is granted if the viewer has fakeplayer.command.invsee permission, is OP, is the fake player's creator, or the config is on. A new "you don't have permission to open this fake player's inventory" hint (en / zh / zh_HK / zh_TW) is shown otherwise. /fp invsee no longer requires the hard permission node — command and right-click now behave identically.
  • Real-player data reuse: new fakeplayer.command.spawn.name.force-real permission (default op). When the requested name belongs to a real player who has played before, players with this permission can force-spawn a fake player using that real player's UUID, reusing their data (inventory, ender chest, xp, etc.). Without it, the existing "name already used" error is shown.

Critical Fixes

  • Auto-replenish after item use (#10): FakeplayerReplenishManager rewritten so fake players replenish consumed/used items correctly; added pre-replenish validation of player and inventory state to prevent NPEs.
  • Lag-level concurrency: the scheduler previously decremented laglevel and called Bukkit.broadcast off the main thread, causing race conditions and illegal Bukkit API access. Now wrapped in Bukkit.getScheduler().runTask on the main thread.
  • Empty fp say message: /fp say now handles empty messages gracefully and shows a dedicated error hint instead of failing.
  • Fixed tps command's short-description message key.

Important Notes

  • Enabling allow-non-op-open-inv lets every player inspect fake player inventories; keep it off on public servers unless intended.
  • fakeplayer.command.spawn.name.force-real defaults to op; granting it lets players reuse a real player's stored data — exercise caution.

Usage

  • Java: 21+ (Java 25 recommended for 26.x support)
  • Server: Paper / Leaf 1.20.1+ (Purpur compatible)
  • API: CommandAPI 12.0.0+ (Mandatory dependency)

Credits


FakePlayer-CE.Build8 —— 非 OP 假人背包访问、真实玩家数据复用与稳定性修复

本次更新新增全局配置 allow-non-op-open-inv 允许非 OP 玩家打开假人背包(含无权限提示),新增 fakeplayer.command.spawn.name.force-real 权限支持在名称被真实玩家占用时复用其数据生成假人,并修复了多项稳定性问题(使用物品后自动补货、卡顿等级并发、空 fp say 消息等)。完整继承 Build7 的聊天与 fp say 动作化重构修复。

核心特性

  • 非 OP 假人背包访问:新增全局配置 allow-non-op-open-inv(默认 false)。开启后任意玩家均可右键或 /fp invsee 打开假人背包。打开判定:拥有 fakeplayer.command.invsee 权限 / OP / 假人创建者 / 配置开启,任一满足即可;否则提示新增文案「你没有权限打开假人的背包」(已补充 en / zh / zh_HK / zh_TW)。/fp invsee 不再强制要求权限节点,命令与右键行为完全一致。
  • 真实玩家数据复用:新增 fakeplayer.command.spawn.name.force-real 权限(默认 op)。当指定名称属于曾登录过的真实玩家时,拥有该权限的玩家可强制以该真实玩家 UUID 生成假人,从而复用其玩家数据(背包、末影箱、经验等);无权限时仍提示「名称已被使用」错误。

关键修复

  • 使用物品后自动补货(#10):重写 FakeplayerReplenishManager,假人使用/消耗物品后正确补货;补货前增加玩家与背包状态校验,规避 NPE。
  • 卡顿等级并发修复:调度器此前在主线程外递减 laglevel 并调用 Bukkit.broadcast,引发竞争与主线程外 Bukkit API 调用。现已用 Bukkit.getScheduler().runTask 包裹至主线程执行。
  • 空 fp say 消息:/fp say 现可优雅处理空消息,并给出专用错误提示而非报错。
  • 修正 tps 命令简短描述键名。

注意事项

  • 开启 allow-non-op-open-inv 将允许所有玩家查看假人背包,公共服务器请谨慎开启。
  • fakeplayer.command.spawn.name.force-real 默认仅 OP;授予后可令玩家复用真实玩家已存储数据,请谨慎分配。

使用要求

  • Java: 21+(26.x 建议 Java 25)
  • 服务端: Paper / Leaf 1.20.1+(兼容 Purpur)
  • API: CommandAPI 12.0.0+(强制依赖)

维护者