Anti World Fly

Anti World Fly

72.4k Downloads

Could not pass event EntityToggleGlideEvent to AntiWorldFly

mibby opened this issue ยท 1 comments

commented

Plugin Version: AntiWorldFly dev 12 (51a0c63)

Minecraft Version: 1.19

Spigot/CraftBukkit version: Purpur dev 1735 (Paper 1.19)

Other Plugins you are using: Incendium DataPack https://www.planetminecraft.com/data-pack/incendium-nether-expansion/

Expected Behavior

No errors.

Current Behavior

Errors.

Steps to Reproduce

  1. Find a Piglin Brute
  2. Errors?

Context (Environment)

Error spam bad. Occurred 272 times. Check should only be done on actual players, not all entities?

Detailed Description

[19:56:35] [Server thread/ERROR]: Could not pass event EntityToggleGlideEvent to AntiWorldFly v2.5.0
java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_19_R1.entity.CraftPiglinBrute cannot be cast to class org.bukkit.entity.Player (org.bukkit.craftbukkit.v1_19_R1.entity.CraftPiglinBrute and org.bukkit.entity.Player are in unnamed module of loader java.net.URLClassLoader @7e32c033)
	at com.hm.antiworldfly.listener.ToggleGlide.onEntityToggleGlideEvent(ToggleGlide.java:32) ~[AntiWorldFly.jar:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1019.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:git-Purpur-1735]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:678) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.callToggleGlideEvent(CraftEventFactory.java:1715) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.world.entity.LivingEntity.updateFallFlying(LivingEntity.java:3563) ~[?:?]
	at net.minecraft.world.entity.LivingEntity.aiStep(LivingEntity.java:3427) ~[?:?]
	at net.minecraft.world.entity.Mob.aiStep(Mob.java:665) ~[?:?]
	at net.minecraft.world.entity.monster.Monster.aiStep(Monster.java:45) ~[?:?]
	at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3033) ~[?:?]
	at net.minecraft.world.entity.Mob.tick(Mob.java:427) ~[?:?]
	at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1236) ~[?:?]
	at net.minecraft.server.level.ServerLevel.lambda$tick$6(ServerLevel.java:715) ~[?:?]
	at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:42) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:693) ~[?:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1580) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:485) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1442) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1209) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:308) ~[purpur-1.19.jar:git-Purpur-1735]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
[19:56:53] [Server thread/ERROR]: Could not pass event EntityToggleGlideEvent to AntiWorldFly v2.5.0
java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_19_R1.entity.CraftPiglinBrute cannot be cast to class org.bukkit.entity.Player (org.bukkit.craftbukkit.v1_19_R1.entity.CraftPiglinBrute and org.bukkit.entity.Player are in unnamed module of loader java.net.URLClassLoader @7e32c033)
	at com.hm.antiworldfly.worldguard.listener.RegionToggleGlide.onEntityToggleGlideEvent(RegionToggleGlide.java:39) ~[AntiWorldFly.jar:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1021.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:git-Purpur-1735]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:678) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.callToggleGlideEvent(CraftEventFactory.java:1715) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.world.entity.LivingEntity.updateFallFlying(LivingEntity.java:3563) ~[?:?]
	at net.minecraft.world.entity.LivingEntity.aiStep(LivingEntity.java:3427) ~[?:?]
	at net.minecraft.world.entity.Mob.aiStep(Mob.java:665) ~[?:?]
	at net.minecraft.world.entity.monster.Monster.aiStep(Monster.java:45) ~[?:?]
	at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3033) ~[?:?]
	at net.minecraft.world.entity.Mob.tick(Mob.java:427) ~[?:?]
	at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1236) ~[?:?]
	at net.minecraft.server.level.ServerLevel.lambda$tick$6(ServerLevel.java:715) ~[?:?]
	at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:42) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:693) ~[?:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1580) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:485) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1442) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1209) ~[purpur-1.19.jar:git-Purpur-1735]
	at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:308) ~[purpur-1.19.jar:git-Purpur-1735]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
commented

Thanks for the report!