Grief Prevention

Grief Prevention

1M Downloads

Could not pass event EntityDeathEvent to GriefPrevention

SrBedrock opened this issue ยท 2 comments

commented

Observed Behavior

Console error when kill a mob.

Expected Behavior

No error on console

Reproduction steps

Kill a mob inside or outside a claim

Stack trace or error log

[12:33:04 ERROR]: Could not pass event EntityDeathEvent to GriefPrevention vf62bac4
java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_20_R3.entity.CraftSkeleton cannot be cast to class org.bukkit.entity.Player (org.bukkit.craftbukkit.v1_20_R3.entity.CraftSkeleton and org.bukkit.entity.Player are in unnamed module of loader java.net.URLClassLoader @36aa7bc2)
        at me.ryanhamshire.GriefPrevention.EntityEventHandler.onEntityDeath(EntityEventHandler.java:551) ~[GriefPrevention-17.0.0-SNAPSHOT.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor376.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:git-Purpur-2153]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.20.4.jar:git-Purpur-2153]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.20.4.jar:git-Purpur-2153]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callEntityDeathEvent(CraftEventFactory.java:995) ~[purpur-1.20.4.jar:git-Purpur-2153]
        at net.minecraft.world.entity.LivingEntity.dropAllDeathLoot(LivingEntity.java:1909) ~[?:?]
        at net.minecraft.world.entity.LivingEntity.die(LivingEntity.java:1801) ~[?:?]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:122) ~[purpur-1.20.4.jar:git-Purpur-2153]
        at com.froobworld.farmcontrol.controller.action.KillAction.doAction(KillAction.java:13) ~[FarmControl-1.2.4.jar:?]
        at com.froobworld.farmcontrol.controller.task.ActionPerformTask.lambda$run$0(ActionPerformTask.java:46) ~[FarmControl-1.2.4.jar:?]
        at com.froobworld.farmcontrol.hook.scheduler.BukkitSchedulerHook.runEntityTaskAsap(BukkitSchedulerHook.java:32) ~[FarmControl-1.2.4.jar:?]
        at com.froobworld.farmcontrol.controller.task.ActionPerformTask.run(ActionPerformTask.java:37) ~[FarmControl-1.2.4.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.4.jar:git-Purpur-2153]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482) ~[purpur-1.20.4.jar:git-Purpur-2153]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1669) ~[purpur-1.20.4.jar:git-Purpur-2153]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:487) ~[purpur-1.20.4.jar:git-Purpur-2153]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1548) ~[purpur-1.20.4.jar:git-Purpur-2153]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1236) ~[purpur-1.20.4.jar:git-Purpur-2153]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.4.jar:git-Purpur-2153]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]

Server version

[12:36:24 INFO]: Current: git-Purpur-2153 (MC: 1.20.4)*
Previous: git-Purpur-2152 (MC: 1.20.4)
* You are running the latest version

GriefPrevention version

[12:37:06 INFO]: [12:37:06 INFO]: GriefPrevention version 23a515c(https://github.com/GriefPrevention/GriefPrevention/commit/23a515cda12adade97b58b34959b459e64142f70)

Configuration

no need

Plugin list

no need

Running without GriefPrevention

  • I attempted running the server without GriefPrevention installed.
  • The problem does not occur when GriefPrevention is removed from the server.

Running with only GriefPrevention

  • I attempted running only GriefPrevention on the server.
  • The issue still occurs when GriefPrevention is the only plugin running.

Running on a fresh, clean server installation

  • I attempted testing for the issue on a new server.
  • The issue still occurs on a new server.

Using unmodified client

  • I attempted testing for the issue with the vanilla client.
  • The issue still occurs when using the vanilla client.

We appreciate you taking the time to fill out a bug report!

  • I searched for similar issues before submitting this bug report.
commented

dang nice find, siege code really was intersecting a lot everywhere.