Skip to content

Commit

Permalink
#113 Fixed entity dispatcher.
Browse files Browse the repository at this point in the history
  • Loading branch information
shynixn committed May 4, 2024
1 parent 8742c39 commit 11805fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@ internal open class EntityDispatcher(
* Handles dispatching the coroutine on the correct thread.
*/
override fun dispatch(context: CoroutineContext, block: Runnable) {
val task = entity.scheduler.run(plugin, {
entity.scheduler.run(plugin, {
block.run()
}, {
block.run()
})

if (task == null) { // Entity was removed. Execute on global region scheduler.
plugin.server.globalRegionScheduler.execute(plugin, block)
}
}
}
2 changes: 1 addition & 1 deletion mccoroutine-folia-sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tasks.withType<ShadowJar> {
archiveName = "$baseName-$version.$extension"

// Change the output folder of the plugin.
// destinationDir = File("C:\\temp\\plugins\\")
// destinationDir = File("C:\\temp\\Folia\\plugins")
}

repositories {
Expand Down

0 comments on commit 11805fd

Please sign in to comment.