MobHunting

MobHunting

114k Downloads

ERROR Could not pass event EntityDeathEvent to MobHunting

sayoui opened this issue ยท 3 comments

commented
[16:51:43] [Server thread/ERROR]: Could not pass event EntityDeathEvent to MobHunting v5.6.2
org.bukkit.event.EventException
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callEntityDeathEvent(CraftEventFactory.java:378) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.EntityLiving.die(EntityLiving.java:874) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.EntitySkeleton.die(EntitySkeleton.java:142) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.EntityLiving.damageEntity(EntityLiving.java:812) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.EntityMonster.damageEntity(EntityMonster.java:42) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at de.Keyle.MyPet.compat.v1_8_R3.entity.EntityMyPet.attack(EntityMyPet.java:347) [MyPet-Premium-2.3.8-SNAPSHOT(1).jar:?]
	at de.Keyle.MyPet.compat.v1_8_R3.entity.ai.attack.MeleeAttack.tick(MeleeAttack.java:115) [MyPet-Premium-2.3.8-SNAPSHOT(1).jar:?]
	at de.Keyle.MyPet.api.entity.ai.AIGoalSelector.tick(AIGoalSelector.java:125) [MyPet-Premium-2.3.8-SNAPSHOT(1).jar:?]
	at de.Keyle.MyPet.compat.v1_8_R3.entity.EntityMyPet.doMyPetTick(EntityMyPet.java:961) [MyPet-Premium-2.3.8-SNAPSHOT(1).jar:?]
	at de.Keyle.MyPet.compat.v1_8_R3.entity.EntityMyPet.m(EntityMyPet.java:896) [MyPet-Premium-2.3.8-SNAPSHOT(1).jar:?]
	at net.minecraft.server.v1_8_R3.EntityLiving.t_(EntityLiving.java:1487) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.EntityInsentient.t_(EntityInsentient.java:193) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at de.Keyle.MyPet.compat.v1_8_R3.entity.EntityMyPet.t_(EntityMyPet.java:1090) [MyPet-Premium-2.3.8-SNAPSHOT(1).jar:?]
	at net.minecraft.server.v1_8_R3.World.entityJoinedWorld(World.java:1607) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.World.g(World.java:1582) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.World.tickEntities(World.java:1425) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.WorldServer.tickEntities(WorldServer.java:597) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:786) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]
Caused by: java.lang.NullPointerException
	at one.lindegaard.MobHunting.MobHuntingManager.onMobDeath(MobHuntingManager.java:912) ~[?:?]
	at sun.reflect.GeneratedMethodAccessor440.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171]
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
	... 25 more
[16:51:45] [Thread-74/INFO]: UUID of player chayanong is 1bedbc54-411d-3e12-be0f-c94402656505
commented

https://github.com/Rocologo/MobHunting/blob/master/src/one/lindegaard/MobHunting/MobHuntingManager.java#L912

Looks like killer or killed is null. I think it is the killer.

Can posible be replicated.

  1. respawn
  2. kill from non player source (lava, other entities etc.) -> Killer is null
commented

Do you know what caused this error?

commented

I agree this happenes because Killer is null in line 912 - and killer is null when a MyPet kills a mob. I should have used "getPlayer(killer, killed)" which handles this situation.

I make a new release later today.

Thank you for reporting this