EndlessCodeGroup / RPGInventory

Custom inventory for Minecraft servers
https://www.spigotmc.org/resources/11809/
GNU General Public License v3.0
40 stars 18 forks source link

Could not pass event EntityDamageByEntityEvent #156

Closed osipxd closed 4 years ago

osipxd commented 6 years ago

Prerequisites

Exception stacktrace

Could not pass event EntityDamageByEntityEvent to RPGInventory v2.1.6
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[server.jar:git-Spigot-2086bb0-21d5f75]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[server.jar:git-Spigot-2086bb0-21d5f75]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) [server.jar:git-Spigot-2086bb0-21d5f75]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) [server.jar:git-Spigot-2086bb0-21d5f75]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callEvent(CraftEventFactory.java:93) [server.jar:git-Spigot-2086bb0-21d5f75]

at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:580) [server.jar:git-Spigot-2086bb0-21d5f75]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:483) [server.jar:git-Spigot-2086bb0-21d5f75]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.handleLivingEntityDamageEvent(CraftEventFactory.java:612) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityLiving.damageEntity0(EntityLiving.java:1346) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityLiving.damageEntity(EntityLiving.java:868) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityMonster.damageEntity(EntityMonster.java:44) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityWolf.B(EntityWolf.java:236) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.PathfinderGoalMeleeAttack.a(SourceFile:127) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.PathfinderGoalMeleeAttack.e(SourceFile:119) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.PathfinderGoalSelector.a(SourceFile:129) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityInsentient.doTick(EntityInsentient.java:664) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityLiving.n(EntityLiving.java:2097) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityInsentient.n(EntityInsentient.java:507) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityAgeable.n(EntityAgeable.java:158) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityAnimal.n(EntityAnimal.java:27) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityWolf.n(EntityWolf.java:152) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityLiving.B_(EntityLiving.java:1946) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityInsentient.B_(EntityInsentient.java:246) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.EntityWolf.B_(EntityWolf.java:167) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.World.entityJoinedWorld(World.java:1631) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.World.h(World.java:1601) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.World.tickEntities(World.java:1435) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.WorldServer.tickEntities(WorldServer.java:668) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:817) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [server.jar:git-Spigot-2086bb0-21d5f75]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [server.jar:git-Spigot-2086bb0-21d5f75]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
Caused by: java.lang.NullPointerException
at ru.endlesscode.rpginventory.inventory.InventoryManager.get(InventoryManager.java:552) ~[?:?]
at ru.endlesscode.rpginventory.pet.PetManager.getPetFromEntity(PetManager.java:347) ~[?:?]
at ru.endlesscode.rpginventory.event.listener.PetListener.onAttack(PetListener.java:263) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_151]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_151]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_151]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_151]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[server.jar:git-Spigot-2086bb0-21d5f75]
... 32 more

To Reproduce If you know how to reproduce, please write in comments

Environment:

osipxd commented 6 years ago

Here this place (line 552): https://github.com/EndlessCodeGroup/RPGInventory/blob/af21a05da9b411d5387d74ed00a6acf7bab9806f/src/main/java/ru/endlesscode/rpginventory/inventory/InventoryManager.java#L551-L553 @NotNull annotation not works in runtime? o.o