NullPointerException on EntityPoseChangeEvent with NPC plugins
Gabo6480 opened this issue ยท 0 comments
Describe the bug
I'm using the PlayerNPC plugin.
And this error appears when NPCs change pose:
"java.lang.NullPointerException: Cannot invoke "io.github.kosmx.emotes.server.network.IServerNetworkInstance.getEmoteTracker()" because the return value of "io.github.kosmx.emotes.server.network.AbstractServerEmotePlay.getPlayerNetworkInstance(Object)" is null"
To Reproduce
Steps to reproduce the behavior:
- Install Emotecraft plugin.
- Install PlayerNPC plugin.
- Create an NPC
- Change it's pose
- See the error log in the console
Expected behavior
Failsafe against this sort of null value behaviours
Minecraft version+mod loader
- Version: 1.19.2
- Modded: Paper
- Server
Plugin version: 2.2.0 bukkit
Minecraft log and crash report:
[22:10:53 ERROR]: Could not pass event EntityPoseChangeEvent to emotecraft v2.2.0
java.lang.NullPointerException: Cannot invoke "io.github.kosmx.emotes.server.network.IServerNetworkInstance.getEmoteTracker()" because the return value of "io.github.kosmx.emotes.server.network.AbstractServerEmotePlay.getPlayerNetworkInstance(Object)" is null
at io.github.kosmx.emotes.server.network.AbstractServerEmotePlay.playerEntersInvalidPose(AbstractServerEmotePlay.java:195) ~[emotecraft-2.2.0-bukkit.jar:?]
at io.github.kosmx.emotes.bukkit.network.ServerSideEmotePlay.playerDies(ServerSideEmotePlay.java:155) ~[emotecraft-2.2.0-bukkit.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor92.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:git-Paper-81]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:670) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
at net.minecraft.world.entity.Entity.setPose(Entity.java:686) ~[paper-1.19.jar:git-Paper-81]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at dev.sergiferry.playernpc.nms.minecraft.NMSEntity.setPose(NMSEntity.java:76) ~[PlayerNPC.jar:?]
at dev.sergiferry.playernpc.api.NPC$Personal.updatePose(NPC.java:1111) ~[PlayerNPC.jar:?]
at dev.sergiferry.playernpc.api.NPC$Personal.create(NPC.java:835) ~[PlayerNPC.jar:?]
at dev.sergiferry.playernpc.api.NPC$Personal.reCreate(NPC.java:1001) ~[PlayerNPC.jar:?]
at dev.sergiferry.playernpc.api.NPC$Personal.forceUpdate(NPC.java:861) ~[PlayerNPC.jar:?]
at dev.sergiferry.corpses.corpse.Corpse.lambda$createPlayer$1(Corpse.java:63) ~[Corpses.jar:?]
at dev.sergiferry.playernpc.api.NPC.lambda$setSkin$1(NPC.java:238) ~[PlayerNPC.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.jar:git-Paper-81]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[paper-1.19.jar:git-Paper-81]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1491) ~[paper-1.19.jar:git-Paper-81]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.19.jar:git-Paper-81]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1415) ~[paper-1.19.jar:git-Paper-81]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1188) ~[paper-1.19.jar:git-Paper-81]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:303) ~[paper-1.19.jar:git-Paper-81]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Additional context
Not a crash.