Respond command failing
KabOOm356 opened this issue ยท 0 comments
Describe the bug
Report a player then try to respond to that report and an error appears.
To Reproduce
Steps to reproduce the behavior:
- Run command
/report ! description
- Run command
/respond [report index]
- See the error below in the log.
java.lang.IllegalStateException: PlayerTeleportEvent cannot be triggered asynchronously from another thread.
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:572) ~[spigot-1.15.2.jar:git-Spigot-a99063f-fad2494]
at org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer.teleport(CraftPlayer.java:638) ~[spigot-1.15.2.jar:git-Spigot-a99063f-fad2494]
at org.bukkit.craftbukkit.v1_15_R1.entity.CraftEntity.teleport(CraftEntity.java:454) ~[spigot-1.15.2.jar:git-Spigot-a99063f-fad2494]
at net.KabOOm356.Command.Commands.RespondCommand.teleportToReport(RespondCommand.java:236) ~[Reporter.jar:?]
at net.KabOOm356.Command.Commands.RespondCommand.execute(RespondCommand.java:92) [Reporter.jar:?]
at net.KabOOm356.Command.ReporterCommand.run(ReporterCommand.java:204) [Reporter.jar:?]
at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:81) [spigot-1.15.2.jar:git-Spigot-a99063f-fad2494]
at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot-1.15.2.jar:git-Spigot-a99063f-fad2494]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_211]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_211]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_211]
Expected behavior
After running /respond [report index]
I expect to be teleported to the position of the report.
Server Information (please complete the following information):
- Server: Spigot
- Version: 1.15.2-R0.1-SNAPSHOT
Reporter Information (please complete the following information):
- Version 3.3.3
- Database Engine: SQLite and MySQL