From ba97c92e891cf3249fd5671c2662b7e038d83987 Mon Sep 17 00:00:00 2001 From: Kory <6561358+kory33@users.noreply.github.com> Date: Fri, 23 Jul 2021 01:30:30 +0900 Subject: [PATCH] [fix] fix #1063 --- .../com/github/unchama/util/effect/BukkitResources.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/scala/com/github/unchama/util/effect/BukkitResources.scala b/src/main/scala/com/github/unchama/util/effect/BukkitResources.scala index 6ea789b70b..07ff01f68b 100644 --- a/src/main/scala/com/github/unchama/util/effect/BukkitResources.scala +++ b/src/main/scala/com/github/unchama/util/effect/BukkitResources.scala @@ -32,7 +32,11 @@ object BukkitResources { E <: Entity ](spawnLocation: Location, tag: Class[E]): Resource[F, E] = { Resource.make( - Sync[F].delay(spawnLocation.getWorld.spawn(spawnLocation, tag)) + OnMinecraftServerThread[F].runAction[SyncIO, E] { + SyncIO { + spawnLocation.getWorld.spawn(spawnLocation, tag) + } + } )(e => OnMinecraftServerThread[F].runAction[SyncIO, Unit] { SyncIO {