OfflineManager

OfflineManager

4.3k Downloads

NullPointerException: Overworld cannot be null!

martijn-heil opened this issue ยท 2 comments

commented

Pretty much all commands run into this error.

[20:22:12 INFO]: Ninjoh issued server command: /om tp Vulturia
[20:22:12 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'om' in plugin OfflineManager v3.0.4-SNAPSHOT
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:906) ~[paper-1.18.2.jar:git-Paper-347]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2306) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2117) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2098) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[?:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.2.jar:git-Paper-347]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1399) ~[paper-1.18.2.jar:git-Paper-347]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[paper-1.18.2.jar:git-Paper-347]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1376) ~[paper-1.18.2.jar:git-Paper-347]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1369) ~[paper-1.18.2.jar:git-Paper-347]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1347) ~[paper-1.18.2.jar:git-Paper-347]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1229) ~[paper-1.18.2.jar:git-Paper-347]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-347]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Overworld cannot be null!
        at net.flawe.offlinemanager.api.util.v1_18_R2.data.PlayerData.<init>(PlayerData.java:93) ~[OfflineManager+3.0.4-SNAPSHOT.jar:?]
        at net.flawe.offlinemanager.api.util.v1_18_R2.data.PlayerData.<init>(PlayerData.java:83) ~[OfflineManager+3.0.4-SNAPSHOT.jar:?]
        at net.flawe.offlinemanager.api.util.v1_18_R2.NMSManager.getPlayerData(NMSManager.java:78) ~[OfflineManager+3.0.4-SNAPSHOT.jar:?]
        at net.flawe.offlinemanager.OfflineManager.getPlayerData(OfflineManager.java:197) ~[OfflineManager+3.0.4-SNAPSHOT.jar:?]
        at net.flawe.offlinemanager.commands.sub.TeleportCommand.execute(TeleportCommand.java:73) ~[OfflineManager+3.0.4-SNAPSHOT.jar:?]
        at net.flawe.offlinemanager.commands.ManagerCommand.onCommand(ManagerCommand.java:105) ~[OfflineManager+3.0.4-SNAPSHOT.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        ... 21 more

Server version:

This server is running Paper version git-Paper-347 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: 79e07f3)
commented

Looking at net.minecraft.world.level.World I think the field needs to be updated.
World#f seems to refer to the nether, which happens to be disabled on the server this stack trace is from. World#e seems to refer to the overworld. I'll try that out and send a pull request if my thinking is correct.

commented

LOL, in previous versions 1.18.2 the 'f' field belonged to the overworld. Will be fixed. Thx!