aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-06-30 03:57:46 -0500
committeringlettronald <inglettronald@gmail.com>2023-06-30 03:57:46 -0500
commite762856a7881d97fa862c093d84e8e7f673e7168 (patch)
treeae51b42d22b940ea7ff2290964f9648e389cff85 /src/main/kotlin/com/dulkirfabric
parent787b078f056c337fcc87c09963133693cc914fc8 (diff)
downloadDulkirMod-Fabric-e762856a7881d97fa862c093d84e8e7f673e7168.tar.gz
DulkirMod-Fabric-e762856a7881d97fa862c093d84e8e7f673e7168.tar.bz2
DulkirMod-Fabric-e762856a7881d97fa862c093d84e8e7f673e7168.zip
Added ModifyCommand Registration
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric')
-rw-r--r--src/main/kotlin/com/dulkirfabric/Registrations.kt15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/Registrations.kt b/src/main/kotlin/com/dulkirfabric/Registrations.kt
index 9346504..59ba213 100644
--- a/src/main/kotlin/com/dulkirfabric/Registrations.kt
+++ b/src/main/kotlin/com/dulkirfabric/Registrations.kt
@@ -4,12 +4,19 @@ import com.dulkirfabric.DulkirModFabric.EVENT_BUS
import com.dulkirfabric.commands.ConfigCommand
import com.dulkirfabric.commands.DynamicKeyCommand
import com.dulkirfabric.commands.JoinDungeonCommands
-import com.dulkirfabric.events.*
+import com.dulkirfabric.events.BlockOutlineEvent
+import com.dulkirfabric.events.ClientTickEvent
+import com.dulkirfabric.events.MouseScrollEvent
+import com.dulkirfabric.events.WorldRenderLastEvent
+import com.dulkirfabric.events.chat.ChatReceivedEvent
+import com.dulkirfabric.events.chat.ModifyCommandEvent
+import com.dulkirfabric.events.chat.OverlayReceivedEvent
import com.dulkirfabric.features.*
import com.dulkirfabric.features.chat.AbiPhoneDND
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents
import net.fabricmc.fabric.api.client.message.v1.ClientReceiveMessageEvents
+import net.fabricmc.fabric.api.client.message.v1.ClientSendMessageEvents
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents
import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents
import net.fabricmc.fabric.api.client.screen.v1.ScreenMouseEvents
@@ -49,6 +56,7 @@ object Registrations {
EVENT_BUS.subscribe(CustomBlockOutline)
EVENT_BUS.subscribe(AbiPhoneDND)
EVENT_BUS.subscribe(InventoryScale)
+ EVENT_BUS.subscribe(AliasImpl)
}
fun registerEvents() {
@@ -62,6 +70,11 @@ object Registrations {
else !ChatReceivedEvent(message).post()
}
)
+ ClientSendMessageEvents.MODIFY_COMMAND.register(
+ ClientSendMessageEvents.ModifyCommand { command ->
+ ModifyCommandEvent(command).also { it.post() }.command
+ }
+ )
WorldRenderEvents.END.register(
WorldRenderEvents.End { context -> WorldRenderLastEvent(context).post()}
)