Closed crysis992 closed 7 years ago
Erroneous line: "if (forWho.canSee(Bukkit.getPlayer(who))) {"
I have no idea why forWho would be null (or maybe Bukkit.getPlayer(who))... I'm going to look at this later today
Looks like this would be caused by a null packet destination... which should never happen... that's quite bizarre
Not sure if it helps, I'm running Citizens with Player NPCs
Fix coming in 1.3.0
Upon teleporting to another world the plugin throws a NPE:
`12:38:25 ERROR: [MultiLineAPI] Unhandled exception occured in onPacketSending(PacketEvent) for MultiLineAPI java.lang.NullPointerException at org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer.canSee(CraftPlayer.java:1055) ~[patched_1.11.2.jar:git-Paper-1041] at net.blitzcube.mlapi.listener.PacketHandler.spawnPlayer(PacketHandler.java:84) ~[MultiLineAPI.jar:?] at net.blitzcube.mlapi.listener.PacketHandler.onPacketSending(PacketHandler.java:50) ~[MultiLineAPI.jar:?] at com.comphenix.protocol.injector.SortedPacketListenerList.invokeSendingListener(SortedPacketListenerList.java:195) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:149) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at com.comphenix.protocol.injector.PacketFilterManager.handlePacket(PacketFilterManager.java:608) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at com.comphenix.protocol.injector.PacketFilterManager.invokePacketSending(PacketFilterManager.java:584) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at com.comphenix.protocol.injector.netty.ProtocolInjector.packetQueued(ProtocolInjector.java:309) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at com.comphenix.protocol.injector.netty.ProtocolInjector.onPacketSending(ProtocolInjector.java:269) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at com.comphenix.protocol.injector.netty.ChannelInjector.processSending(ChannelInjector.java:396) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at com.comphenix.protocol.injector.netty.ChannelInjector.access$500(ChannelInjector.java:77) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at com.comphenix.protocol.injector.netty.ChannelInjector$5.handleScheduled(ChannelInjector.java:362) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at com.comphenix.protocol.injector.netty.ChannelInjector$5.onMessageScheduled(ChannelInjector.java:330) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at com.comphenix.protocol.injector.netty.ChannelProxy$2.schedulingRunnable(ChannelProxy.java:127) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at com.comphenix.protocol.injector.netty.EventLoopProxy.execute(EventLoopProxy.java:95) [ProtocolLib.jar:4.2.1-SNAPSHOT-b346] at net.minecraft.server.v1_11_R1.NetworkManager.a(NetworkManager.java:198) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.NetworkManager.sendPacket(NetworkManager.java:143) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.PlayerConnection.sendPacket(PlayerConnection.java:1100) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.EntityTrackerEntry.updatePlayer(EntityTrackerEntry.java:369) [patched_1.11.2.jar:git-Paper-1041] at net.citizensnpcs.nms.v1_11_R1.util.PlayerlistTrackerEntry.updatePlayer(PlayerlistTrackerEntry.java:45) [Citizens.jar:?] at net.minecraft.server.v1_11_R1.EntityTracker.a(EntityTracker.java:264) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.PlayerChunk.sendChunk(PlayerChunk.java:158) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.PlayerChunk.a(PlayerChunk.java:75) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.PlayerChunkMap.addPlayer(PlayerChunkMap.java:301) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.PlayerList.moveToWorld(PlayerList.java:698) [patched_1.11.2.jar:git-Paper-1041] at org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer.teleport(CraftPlayer.java:597) [patched_1.11.2.jar:git-Paper-1041] at org.bukkit.craftbukkit.v1_11_R1.entity.CraftEntity.teleport(CraftEntity.java:255) [patched_1.11.2.jar:git-Paper-1041] at crytec.core.util.UtilPlayer.teleport(UtilPlayer.java:93) [API.jar:?] at net.crytec.commands.Teleport.Spawn.onCommand(Spawn.java:24) [KnicksCore.jar:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [patched_1.11.2.jar:git-Paper-1041] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:151) [patched_1.11.2.jar:git-Paper-1041] at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchCommand(CraftServer.java:675) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.PlayerConnection.handleCommand(PlayerConnection.java:1384) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:1189) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.PlayerConnectionUtils$1.run(SourceFile:13) [patched_1.11.2.jar:git-Paper-1041] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_121] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_121] at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:821) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:403) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:749) [patched_1.11.2.jar:git-Paper-1041] at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:648) [patched_1.11.2.jar:git-Paper-1041] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
net.minecraft.server.v1_11_R1.PacketPlayOutNamedEntitySpawn@647b33f8[ a=688 b=5e99fda5-929e-25cf-9038-3775ff05af13 c=146.3742 d=69.0 e=229.1382 f=0 g=0 h=net.minecraft.server.v1_11_R1.DataWatcher@3276eb99 i=
]`