Rosewood-Development / RoseStacker

A next-generation stacker plugin for Spigot and Paper servers
Other
139 stars 36 forks source link

Weird exception when rose stacker tries to pass async death event to WG #47

Closed Skullslice closed 2 years ago

Skullslice commented 2 years ago

Rosestacker Version 1.4.2 WorldGuard Version 7.0.6 Spigot 1.18.1

Steps to reproduce: config option "trigger-death-event-for-entire-stack-kill: true" hit a mob in mid-air before it falls to its death and when it hits the ground we get an exception:

[19:01:19] [Craft Scheduler Thread - 30/ERROR]: Could not pass event AsyncEntityDeathEvent to WorldGuard v7.0.6+1cff55f org.bukkit.event.EventException: null at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?] at dev.rosewood.rosestacker.stack.StackedEntity.lambda$dropPartialStackLoot$4(StackedEntity.java:266) ~[?:?] at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:82) [spigot-1.18.1-R0.1-SNAPSHOT.jar:3369-Spigot-8965a50-2a2caa7] at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot-1.18.1-R0.1-SNAPSHOT.jar:3369-Spigot-8965a50-2a2caa7] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?] at java.lang.Thread.run(Thread.java:833) [?:?] Caused by: java.lang.IllegalStateException: SpawnEntityEvent cannot be triggered asynchronously from another thread. at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:572) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?] at com.sk89q.worldguard.bukkit.util.Events.fireAndTestCancel(Events.java:60) ~[?:?] at com.sk89q.worldguard.bukkit.listener.EventAbstractionListener.onEntityDeath(EventAbstractionListener.java:812) ~[?:?] at jdk.internal.reflect.GeneratedMethodAccessor161.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?] ... 9 more

Esophose commented 2 years ago

Disable the async-death-event setting in the config.yml and that should go away.

Skullslice commented 2 years ago

i need it on for roseloot to work

Esophose commented 2 years ago

You don't need the async death event for RoseLoot, just the trigger-death-event-for-entire-stack-kill

Skullslice commented 2 years ago

thanks found it.