NullPointerException after unloading a world (Bukkit.unloadWorld) that contained players
LadyCailinBot opened this issue ยท 0 comments
WORLDGUARD-3974 - Reported by Brokkonaut
Sometimes after a world is unloaded that contained players one of following (or a similar) exception is thrown:
[01:26:13] [Server thread/ERROR]: Could not pass event PlayerTeleportEvent to WorldGuard v7.0.0-SNAPSHOT;1744-8e819f7
org.bukkit.event.EventException: null
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:72) ~[patched_1.13.1.jar:git-Paper-249]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.13.1.jar:git-Paper-249]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.13.1.jar:git-Paper-249]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:513) ~[patched_1.13.1.jar:git-Paper-249]
at org.bukkit.craftbukkit.v1_13_R2.entity.CraftPlayer.teleport(CraftPlayer.java:723) ~[patched_1.13.1.jar:git-Paper-249]
at org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity.teleport(CraftEntity.java:327) ~[patched_1.13.1.jar:git-Paper-249]
at de.iani.arcade.MapController.teleportToMap(MapController.java:463) ~[?:?]
at de.iani.arcade.commands.maps.TpToMapCommand.onCommand(TpToMapCommand.java:39) ~[?:?]
at de.iani.arcade.CommandRouter.onCommand(CommandRouter.java:143) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[patched_1.13.1.jar:git-Paper-249]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:151) ~[patched_1.13.1.jar:git-Paper-249]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:726) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.PlayerConnection.handleCommand(PlayerConnection.java:1768) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1572) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:12) ~[patched_1.13.1.jar:git-Paper-249]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_181]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_181]
at net.minecraft.server.v1_13_R2.SystemUtils.a(SourceFile:199) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1012) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:428) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:940) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:838) ~[patched_1.13.1.jar:git-Paper-249]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Caused by: java.lang.NullPointerException: The world was unloaded and the reference is unavailable
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787) ~[patched_1.13.1.jar:git-Paper-249]
at com.sk89q.worldedit.bukkit.BukkitWorld.getWorld(BukkitWorld.java:140) ~[?:?]
at com.sk89q.worldedit.bukkit.BukkitWorld.equals(BukkitWorld.java:321) ~[?:?]
at com.sk89q.worldguard.session.WorldPlayerTuple.equals(WorldPlayerTuple.java:43) ~[?:?]
at com.google.common.base.Equivalence$Equals.doEquivalent(Equivalence.java:346) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.base.Equivalence.equivalent(Equivalence.java:73) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache$Segment.getEntry(LocalCache.java:2836) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2194) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache.get(LocalCache.java:4154) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) ~[patched_1.13.1.jar:git-Paper-249]
at com.sk89q.worldguard.bukkit.session.BukkitSessionManager.hasBypass(BukkitSessionManager.java:114) ~[?:?]
at com.sk89q.worldguard.session.handler.EntryFlag.onCrossBoundary(EntryFlag.java:55) ~[?:?]
at com.sk89q.worldguard.session.Session.testMoveTo(Session.java:208) ~[?:?]
at com.sk89q.worldguard.session.Session.testMoveTo(Session.java:168) ~[?:?]
at com.sk89q.worldguard.bukkit.listener.WorldGuardPlayerListener.onPlayerTeleport(WorldGuardPlayerListener.java:386) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor105.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[patched_1.13.1.jar:git-Paper-249]
... 24 more
[01:28:19] [Server thread/ERROR]: Could not pass event PlayerCommandPreprocessEvent to WorldGuard v7.0.0-SNAPSHOT;1744-8e819f7
org.bukkit.event.EventException: null
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:72) ~[patched_1.13.1.jar:git-Paper-249]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.13.1.jar:git-Paper-249]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.13.1.jar:git-Paper-249]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:513) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.PlayerConnection.handleCommand(PlayerConnection.java:1760) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1572) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:12) ~[patched_1.13.1.jar:git-Paper-249]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_181]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_181]
at net.minecraft.server.v1_13_R2.SystemUtils.a(SourceFile:199) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1012) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:428) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:940) ~[patched_1.13.1.jar:git-Paper-249]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:838) ~[patched_1.13.1.jar:git-Paper-249]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Caused by: java.lang.NullPointerException: The world was unloaded and the reference is unavailable
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787) ~[patched_1.13.1.jar:git-Paper-249]
at com.sk89q.worldedit.bukkit.BukkitWorld.getWorld(BukkitWorld.java:140) ~[?:?]
at com.sk89q.worldedit.bukkit.BukkitWorld.equals(BukkitWorld.java:321) ~[?:?]
at com.sk89q.worldguard.session.WorldPlayerTuple.equals(WorldPlayerTuple.java:43) ~[?:?]
at com.google.common.base.Equivalence$Equals.doEquivalent(Equivalence.java:346) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.base.Equivalence.equivalent(Equivalence.java:73) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache$Segment.getEntry(LocalCache.java:2836) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2194) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache.get(LocalCache.java:4154) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) ~[patched_1.13.1.jar:git-Paper-249]
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) ~[patched_1.13.1.jar:git-Paper-249]
at com.sk89q.worldguard.bukkit.session.BukkitSessionManager.hasBypass(BukkitSessionManager.java:114) ~[?:?]
at com.sk89q.worldguard.bukkit.listener.WorldGuardPlayerListener.onPlayerCommandPreprocess(WorldGuardPlayerListener.java:473) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor107.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[patched_1.13.1.jar:git-Paper-249]
... 16 more