aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/Firmament.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-09-27 01:07:17 +0200
committernea <nea@nea.moe>2023-09-27 01:07:17 +0200
commit6754ab61dc56bf85dcae9a66a0040c0df6e3b2d6 (patch)
treedfd1698077c7384810c5aaedf1d645c27daf4d34 /src/main/kotlin/moe/nea/firmament/Firmament.kt
parenteaf91279b8f65b30f05a7be9a8ae1b6b18859ae4 (diff)
downloadFirmament-6754ab61dc56bf85dcae9a66a0040c0df6e3b2d6.tar.gz
Firmament-6754ab61dc56bf85dcae9a66a0040c0df6e3b2d6.tar.bz2
Firmament-6754ab61dc56bf85dcae9a66a0040c0df6e3b2d6.zip
Add quick /join command for catacombs and kuudra
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/Firmament.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/Firmament.kt41
1 files changed, 24 insertions, 17 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/Firmament.kt b/src/main/kotlin/moe/nea/firmament/Firmament.kt
index 6a6007e..3681ab6 100644
--- a/src/main/kotlin/moe/nea/firmament/Firmament.kt
+++ b/src/main/kotlin/moe/nea/firmament/Firmament.kt
@@ -14,19 +14,8 @@ import io.ktor.client.plugins.compression.*
import io.ktor.client.plugins.contentnegotiation.*
import io.ktor.client.plugins.logging.*
import io.ktor.serialization.kotlinx.json.*
-import kotlinx.coroutines.*
-import kotlinx.serialization.json.Json
-import moe.nea.firmament.commands.registerFirmamentCommand
-import moe.nea.firmament.dbus.FirmamentDbusObject
-import moe.nea.firmament.events.ItemTooltipEvent
-import moe.nea.firmament.events.ScreenRenderPostEvent
-import moe.nea.firmament.events.TickEvent
-import moe.nea.firmament.events.registration.registerFirmamentChatEvents
-import moe.nea.firmament.features.FeatureManager
-import moe.nea.firmament.repo.HypixelStaticData
-import moe.nea.firmament.repo.RepoManager
-import moe.nea.firmament.util.SBData
-import moe.nea.firmament.util.data.IDataHolder
+import java.nio.file.Files
+import java.nio.file.Path
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents
@@ -36,15 +25,32 @@ import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents
import net.fabricmc.loader.api.FabricLoader
import net.fabricmc.loader.api.Version
import net.fabricmc.loader.api.metadata.ModMetadata
-import net.minecraft.command.CommandRegistryAccess
-import net.minecraft.util.Identifier
import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger
import org.freedesktop.dbus.connections.impl.DBusConnectionBuilder
import org.freedesktop.dbus.exceptions.DBusException
-import java.nio.file.Files
-import java.nio.file.Path
+import kotlinx.coroutines.CoroutineName
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Job
+import kotlinx.coroutines.SupervisorJob
+import kotlinx.coroutines.plus
+import kotlinx.coroutines.runBlocking
+import kotlinx.serialization.json.Json
import kotlin.coroutines.EmptyCoroutineContext
+import net.minecraft.command.CommandRegistryAccess
+import net.minecraft.util.Identifier
+import moe.nea.firmament.commands.registerFirmamentCommand
+import moe.nea.firmament.dbus.FirmamentDbusObject
+import moe.nea.firmament.events.CommandEvent
+import moe.nea.firmament.events.ItemTooltipEvent
+import moe.nea.firmament.events.ScreenRenderPostEvent
+import moe.nea.firmament.events.TickEvent
+import moe.nea.firmament.events.registration.registerFirmamentChatEvents
+import moe.nea.firmament.features.FeatureManager
+import moe.nea.firmament.repo.HypixelStaticData
+import moe.nea.firmament.repo.RepoManager
+import moe.nea.firmament.util.SBData
+import moe.nea.firmament.util.data.IDataHolder
object Firmament {
const val MOD_ID = "firmament"
@@ -101,6 +107,7 @@ object Firmament {
ctx: CommandRegistryAccess
) {
registerFirmamentCommand(dispatcher)
+ CommandEvent.publish(CommandEvent(dispatcher, ctx))
}
@JvmStatic