diff --git a/binding/src/main/kotlin/com/mythlane/async/binding/AsyncPlugin.kt b/binding/src/main/kotlin/com/mythlane/async/binding/AsyncPlugin.kt new file mode 100644 index 0000000..46bac3e --- /dev/null +++ b/binding/src/main/kotlin/com/mythlane/async/binding/AsyncPlugin.kt @@ -0,0 +1,23 @@ +package com.mythlane.async.binding + +import com.hypixel.hytale.server.core.plugin.JavaPlugin +import com.hypixel.hytale.server.core.plugin.JavaPluginInit +import com.mythlane.async.Async + +/** + * Standalone library-plugin entry point. Drop the shaded jar in `mods/` and + * other plugins can depend on Async without bundling it themselves. + * + * Installs the disconnect hook on start and drains every tracked scope on + * shutdown. Plugins that bundle Async directly should keep calling + * [installAsync] and [Async.shutdown] themselves and not rely on this class. + */ +class AsyncPlugin(init: JavaPluginInit) : JavaPlugin(init) { + override fun start() { + installAsync() + } + + override fun shutdown() { + Async.shutdown() + } +} diff --git a/dist/src/main/resources/manifest.json b/dist/src/main/resources/manifest.json new file mode 100644 index 0000000..ff4e5df --- /dev/null +++ b/dist/src/main/resources/manifest.json @@ -0,0 +1,16 @@ +{ + "Group": "Mythlane", + "Name": "Async", + "Version": "0.1.0", + "Description": "Kotlin coroutines for Hytale plugins. Thread-safe ECS access, off-thread blocking I/O, and automatic cancellation on disconnect or world unload.", + "Authors": [ + { "Name": "Mythlane", "Email": "contact@mythlane.com", "Url": "https://mythlane.com" } + ], + "Website": "https://mythlane.com", + "Main": "com.mythlane.async.binding.AsyncPlugin", + "ServerVersion": "2026.03.26-89796e57b", + "Dependencies": {}, + "OptionalDependencies": {}, + "DisabledByDefault": false, + "IncludesAssetPack": false +}