Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a0ad12b208 |
@@ -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()
|
||||
}
|
||||
}
|
||||
+16
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user