From fb40ab45f0b4979420bae066da2244f4fdd52db8 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Tue, 24 Sep 2024 13:16:55 +0200 Subject: snapshot --- src/main/kotlin/commands/Commands.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/kotlin/commands/Commands.kt') diff --git a/src/main/kotlin/commands/Commands.kt b/src/main/kotlin/commands/Commands.kt index 4509fcf..95e8685 100644 --- a/src/main/kotlin/commands/Commands.kt +++ b/src/main/kotlin/commands/Commands.kt @@ -3,6 +3,7 @@ package moe.nea.ultranotifier.commands import com.mojang.brigadier.builder.LiteralArgumentBuilder import moe.nea.ultranotifier.UltraNotifier import moe.nea.ultranotifier.event.CommandRegistrationEvent +import moe.nea.ultranotifier.event.SubscriptionTarget import moe.nea.ultranotifier.event.UltraNotifierEvents import moe.nea.ultranotifier.event.UltraSubscribe import net.minecraft.text.Text @@ -35,7 +36,7 @@ fun literalText(string: String): Text = //$$ net.minecraft.util.ChatComponentText(string) //#endif -object Commands { +object Commands : SubscriptionTarget { @UltraSubscribe fun registerTestCommand(event: CommandRegistrationEvent) { event.dispatcher.register(LiteralArgumentBuilder.literal("hello") @@ -45,8 +46,7 @@ object Commands { }) } - fun init() { - UltraNotifierEvents.register(this) + override fun init() { //#if FORGE //$$ UltraNotifierEvents.register(BrigadierPatchbay) //#else -- cgit