StargateListPortalEvent is triggered asyncronously during `R` portal creation
Pheotis opened this issue ยท 0 comments
Bug Description
Attempting to migrate legacy throws a localisation warning.
Reproduction Steps
- Start the latest legacy on spigot 1.17.1 and build a few portals.
- Stop the server and swap both the legacy jar (with the latest nightly) and the spigot jar (with the latest paper)
- Start the paper server and observe the warning.
Desired Behaviour
When migrating legacy, the migrator should aproximate legacy's locale and load a localisation.
If the locale can not be determined, it should default to english.
Observed Behaviour
WARN]: [Stargate] java.lang.IllegalStateException: StargateListPortalEvent may only be triggered synchronously.
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:42)
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:627)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.network.StargateNetwork.getAvailablePortals(StargateNetwork.java:185)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.api.network.portal.behavior.RandomBehavior.getDestination(RandomBehavior.java:35)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.api.network.portal.behavior.AbstractPortalBehavior.getDestinationName(AbstractPortalBehavior.java:138)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.database.SQLQueryGenerator.generateAddPortalStatement(SQLQueryGenerator.java:401)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.database.SQLDatabase.savePortalToStorage(SQLDatabase.java:138)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.network.StargateNetworkManager$3.run(StargateNetworkManager.java:254)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateTask.runTask(StargateTask.java:101)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateQueuedAsyncTask.lambda$runNow$0(StargateQueuedAsyncTask.java:30)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateQueuedAsyncTask.cycleThroughAsyncQueue(StargateQueuedAsyncTask.java:75)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateQueuedAsyncTask$3.run(StargateQueuedAsyncTask.java:66)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateTask.runTask(StargateTask.java:101)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateAsyncTask.lambda$runNow$1(StargateAsyncTask.java:21)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateBukkitRunnable.run(StargateBukkitRunnable.java:13)
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101)
at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Trace Logs
No response
Other Information
Tested on windows.