Paper icon indicating copy to clipboard operation
Paper copied to clipboard

[1.17] Invalid player data when the world is reset

Open paul-maxime opened this issue 5 years ago • 4 comments

Expected behavior

When the world stored in the player data no longer exists, the player should be teleported to the spawn.

Observed/Actual behavior

When the world stored in the player data no longer exists, the player cannot join:

[18:04:18 INFO]: UUID of player Maxou is 06312f93-09e6-4763-83a0-6ab58fcb582f
[18:04:18 INFO]: com.mojang.authlib.GameProfile@41fd063e[id=06312f93-09e6-4763-83a0-6ab58fcb582f,name=Maxou,properties={textures=[com.mojang.authlib.properties.Property@22420b19]},legacy=false] (/*:60904) lost connection: Invalid player data

javaw_9EkXM16aXe

Steps/models to reproduce

  • Install, start and join a fresh paper server (no plugins, default configuration).
  • Stop the server.
  • Delete /world/ but keep /world/playerdata/
  • Start the server and join.

Plugin list

n/a

Paper version

> version
[18:05:31 INFO]: Checking version, please wait...
[18:05:31 INFO]: This server is running Paper version git-Paper-"33d6b6f" (MC: 1.17) (Implementing API version 1.17-R0.1-SNAPSHOT)
You are running the latest version

Agreements

  • [X] I am running the latest version of Paper available from https://papermc.io/downloads.
  • [X] I have searched for and ensured there isn't already an open issue regarding this.
  • [X] My version of Minecraft is supported by Paper.

Other

No response

paul-maxime avatar Jun 20 '21 16:06 paul-maxime

I have also been able to reproduce this error myself.

Xemorr avatar Jun 20 '21 16:06 Xemorr

This issue can by manually avoided by editing the players NBT files.

  • Open each player file inside /world/playerdata/ using some kind of NBT editor. (https://irath96.github.io/webNBT/ is great if you don't have many players, otherwise you'll need a script.)
  • Replace .WorldUUIDLeast, .WorldUUIDMost and .Pos with your spawn location.

paul-maxime avatar Jun 20 '21 19:06 paul-maxime

enable debug in server.properties and provide the log

electronicboy avatar Jun 20 '21 22:06 electronicboy

[00:51:26 INFO]: UUID of player Maxou is 06312f93-09e6-4763-83a0-6ab58fcb582f
[00:51:26 WARN]: net.minecraft.ReportedException: Loading entity NBT
[00:51:26 WARN]:        at net.minecraft.world.entity.Entity.load(Entity.java:2120)
[00:51:26 WARN]:        at net.minecraft.world.level.storage.WorldNBTStorage.load(WorldNBTStorage.java:96)
[00:51:26 WARN]:        at net.minecraft.server.players.PlayerList.a(PlayerList.java:556)
[00:51:26 WARN]:        at net.minecraft.server.players.PlayerList.a(PlayerList.java:189)
[00:51:26 WARN]:        at net.minecraft.server.network.LoginListener.a(LoginListener.java:217)
[00:51:26 WARN]:        at net.minecraft.server.network.LoginListener.c(LoginListener.java:199)
[00:51:26 WARN]:        at net.minecraft.server.network.LoginListener.tick(LoginListener.java:87)
[00:51:26 WARN]:        at net.minecraft.network.NetworkManager.a(NetworkManager.java:394)
[00:51:26 WARN]:        at net.minecraft.server.network.ServerConnection.c(ServerConnection.java:196)
[00:51:26 WARN]:        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1576)
[00:51:26 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:476)
[00:51:26 WARN]:        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1404)
[00:51:26 WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1180)
[00:51:26 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320)
[00:51:26 WARN]:        at java.base/java.lang.Thread.run(Thread.java:831)
[00:51:26 WARN]: Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.World.getWorld()" because "this.t" is null
[00:51:26 WARN]:        at net.minecraft.world.entity.Entity.load(Entity.java:2083)
[00:51:26 WARN]:        ... 14 more
[00:51:26 INFO]: com.mojang.authlib.GameProfile@65c4c5bd[id=06312f93-09e6-4763-83a0-6ab58fcb582f,name=Maxou,properties={textures=[com.mojang.authlib.properties.Property@50a6c7c2]},legacy=false] (/*:63803) lost connection: Invalid player data

paul-maxime avatar Jun 20 '21 22:06 paul-maxime