Jikoo / OpenInv

Open anyone's inventory as a chest, real-time!
GNU General Public License v3.0
118 stars 37 forks source link

Can't /oi a specific player? #138

Closed melaniebeedot closed 1 year ago

melaniebeedot commented 1 year ago

Keep getting this error in console when we try to /oi this player:

[17:37:50 INFO]: melaniebeedot issued server command: /oi 1block2 [17:37:50 WARN]: [OpenInv] Task #1944167 for OpenInv v4.3.0 generated an exception java.lang.NullPointerException: Cannot invoke "net.minecraft.server.level.WorldServer.getCraftServer()" because the return value of "net.minecraft.server.level.EntityPlayer.x()" is null at net.minecraft.server.level.ServerPlayer.spawnIn(ServerPlayer.java:591) ~[?:?] at com.lishid.openinv.internal.v1_19_R3.PlayerDataManager.loadPlayer(PlayerDataManager.java:127) ~[OpenInv.jar:?] at com.lishid.openinv.OpenInv.loadPlayer(OpenInv.java:311) ~[OpenInv.jar:?] at com.lishid.openinv.commands.OpenInvCommand.openInventory(OpenInvCommand.java:143) ~[OpenInv.jar:?] at com.lishid.openinv.commands.OpenInvCommand$1$1.run(OpenInvCommand.java:98) ~[OpenInv.jar:?] at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.4.jar:git-Paper-484] at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[paper-1.19.4.jar:git-Paper-484] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1483) ~[paper-1.19.4.jar:git-Paper-484] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.19.4.jar:git-Paper-484] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1397) ~[paper-1.19.4.jar:git-Paper-484] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.19.4.jar:git-Paper-484] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-484] at java.lang.Thread.run(Thread.java:833) ~[?:?]

Jikoo commented 1 year ago

You're trying to load a player who is in a world that no longer exists. Looks like Paper changed things again? We have a guard for Paper's patch of CB behavior already as discussed in #130, but I guess it isn't working properly any more.

melaniebeedot commented 1 year ago

Ah that explains it, this player was x-raying diamonds in our resource world when he was banned and we’ve since reset the world with a fresh seed. Same world name but I guess that doesn’t count. So no accessing his inventory until he gets unbanned and logs back in?

On Mon, Apr 17, 2023 at 7:31 PM Adam @.***> wrote:

You're trying to load a player who is in a world that no longer exists. Looks like Paper changed things again? We have a guard for Paper's patch of CB behavior already as discussed in #130 https://github.com/Jikoo/OpenInv/pull/130, but I guess it isn't working properly any more.

— Reply to this email directly, view it on GitHub https://github.com/Jikoo/OpenInv/issues/138#issuecomment-1511882006, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXQWYNZB5ROSC6XBYTF24SLXBWEATANCNFSM6AAAAAAXBQGIIQ . You are receiving this because you authored the thread.Message ID: @.***>

Jikoo commented 1 year ago

Not until I fix the bug on OI's end, yes. If the world has a different UUID it is a different world as far as MC's internals are concerned, even if the name matches.

melaniebeedot commented 1 year ago

Ok no worries, thanks for the prompt response and a great plugin! :)

On Mon, Apr 17, 2023 at 9:13 PM Adam @.***> wrote:

Not until I fix the bug on OI's end, yes. If the world has a different UUID it is a different world as far as MC's internals are concerned, even if the name matches.

— Reply to this email directly, view it on GitHub https://github.com/Jikoo/OpenInv/issues/138#issuecomment-1512019651, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXQWYN7MKETOI4U2GHJOYT3XBWP6FANCNFSM6AAAAAAXBQGIIQ . You are receiving this because you authored the thread.Message ID: @.***>