tanyaofei / minecraft-fakeplayer

A plugin for minecraft server to spawn fake players, inspired by Carpet Mod
Apache License 2.0
96 stars 12 forks source link

假人出现丢背包情况 #63

Closed JongJohnky closed 2 months ago

JongJohnky commented 2 months ago

Describe the bug / 描述你的 bug 情况 假人上下线背包数据丢失 A clear and concise description of what the bug is. / 简单描述这是一个什么 bug 假人上下线背包数据丢失 To Reproduce / 如何触发 Steps to reproduce the behavior: / 触发的步骤

  1. fp spawn
  2. 将物品放入假人背包
  3. fp kill
  4. 继续fp spawn,假人背包数据丢失

Server information / 服务器信息

Additional context / 更多信息 Add any other context about the problem here. Such as log and plugin list / 添加更多有帮助的信息,如插件列表、日志

JongJohnky issued server command: /fp spawn 13:54:05 WARN: [fakeplayer] Could not generate a UUID bound with name 'JongJohnky_1' which is never played at this server, using random UUID as fallback: 2994d8c2-6c8b-4fe8-b360-9f62e7af842a 13:54:05 WARN: [LuckPerms] LuckPerms already has data for player 'JongJohnky_1' - but this data is stored under a different UUID.

13:54:05 WARN: [LuckPerms] The UUID the player is connecting with now is Mojang-assigned (type 4). This implies that one of the other servers in your network is not authenticating correctly. 13:54:05 WARN: [LuckPerms] If you're using BungeeCord/Velocity, please ensure that IP-Forwarding is setup correctly on all of your backend servers! 13:54:05 WARN: [LuckPerms] See here for more info: https://luckperms.net/wiki/Network-Installation#pre-setup [13:54:06 WARN]: [ViaVersion] Could not find UserConnection for logging-in player 2994d8c2-6c8b-4fe8-b360-9f62e7af842a [13:54:06 INFO]: [+] 玩家 JongJohnky_1 进入服务器! [13:54:06 INFO]: JongJohnky_1[/127.0.0.12:25565] logged in with entity id 1385004 at ([world]2.5, 79.0, 6.5) [13:54:07 INFO]: [fakeplayer] JongJohnky_1 issued command: register abc123 abc123 [13:54:07 INFO]: [fakeplayer] JongJohnky_1 issued command: login abc123 [13:54:07 INFO]: [AuthMe] JongJohnky_1 logged in 127.0.0.12

日志提示疑似与假人uuid发生变化有关导致的背包数据丢失。登陆插件是Authmerereload

tanyaofei commented 2 months ago

假人生成的时候会结合 serverid 作为种子,以及名称来生成一个 UUID,并且会判断改 UUID 没有在服务器里游玩过,但是如果生成出来的 UUID 被判断使用过,就会使用随机 UUID,存档是跟 UUID 绑定的,因此随机 UUID 的背包是空的。

这里面可能导致的原因是:

  1. serverid 没有正常保存,
  2. used-uuids.txt 没有正常保存,导致实际上是假人第一次使用的 UUID 认为是服务器其他玩家的 UUID
  3. 这个名称生成出来的 UUID 确实被使用过
JongJohnky commented 2 months ago

我看了used-uuids.txt只有两条uuid记录,应该是这个没有正常保存,serverid正常生成

tanyaofei commented 2 months ago

我看了used-uuids.txt只有两条uuid记录,应该是这个没有正常保存,serverid正常生成

https://github.com/tanyaofei/minecraft-fakeplayer/releases/tag/0.3.7 这个版本修复了这个问题