aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-06-10 16:45:36 -0500
committeringlettronald <inglettronald@gmail.com>2023-06-10 16:45:36 -0500
commit8b69b68978e32d6f8e66fca06a8c7ed36523062f (patch)
tree4e87875b353a527b9a31b1b4ebd188b87e3d2a5d /src
parentfae20106650fd5e2b6c1b72e7a778ee6fae7bb4a (diff)
downloadDulkirMod-Fabric-8b69b68978e32d6f8e66fca06a8c7ed36523062f.tar.gz
DulkirMod-Fabric-8b69b68978e32d6f8e66fca06a8c7ed36523062f.tar.bz2
DulkirMod-Fabric-8b69b68978e32d6f8e66fca06a8c7ed36523062f.zip
initial commit
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/com/dulkirfabric/events/ChatReceivedEvent.kt6
-rw-r--r--src/main/kotlin/com/dulkirfabric/events/OverlayReceivedEvent.kt5
-rw-r--r--src/main/kotlin/com/dulkirfabric/features/KeyShortCutImpl.kt21
-rw-r--r--src/main/kotlin/com/dulkirfabric/features/NoReverseCam.kt4
4 files changed, 36 insertions, 0 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/events/ChatReceivedEvent.kt b/src/main/kotlin/com/dulkirfabric/events/ChatReceivedEvent.kt
new file mode 100644
index 0000000..892baf1
--- /dev/null
+++ b/src/main/kotlin/com/dulkirfabric/events/ChatReceivedEvent.kt
@@ -0,0 +1,6 @@
+package com.dulkirfabric.events
+
+import com.dulkirfabric.events.base.CancellableEvent
+
+data class
+ChatReceivedEvent(val message: String): CancellableEvent() \ No newline at end of file
diff --git a/src/main/kotlin/com/dulkirfabric/events/OverlayReceivedEvent.kt b/src/main/kotlin/com/dulkirfabric/events/OverlayReceivedEvent.kt
new file mode 100644
index 0000000..d97dda1
--- /dev/null
+++ b/src/main/kotlin/com/dulkirfabric/events/OverlayReceivedEvent.kt
@@ -0,0 +1,5 @@
+package com.dulkirfabric.events
+
+import com.dulkirfabric.events.base.CancellableEvent
+
+data class OverlayReceivedEvent(val message: String): CancellableEvent()
diff --git a/src/main/kotlin/com/dulkirfabric/features/KeyShortCutImpl.kt b/src/main/kotlin/com/dulkirfabric/features/KeyShortCutImpl.kt
new file mode 100644
index 0000000..c94c258
--- /dev/null
+++ b/src/main/kotlin/com/dulkirfabric/features/KeyShortCutImpl.kt
@@ -0,0 +1,21 @@
+package com.dulkirfabric.features
+
+import com.dulkirfabric.config.DulkirConfig
+import com.dulkirfabric.events.WorldKeyPressEvent
+import com.dulkirfabric.util.TextUtils
+import meteordevelopment.orbit.EventHandler
+
+object KeyShortCutImpl {
+ @EventHandler
+ fun onKeyPress(event: WorldKeyPressEvent) {
+ DulkirConfig.configOptions.macrosList.forEach {
+ if (it.keyBinding.code == event.key) {
+ // This conditional allows for these shortcuts to work for commands or normal messages
+ if (it.command.startsWith("/"))
+ TextUtils.sendCommand(it.command.substring(1))
+ else
+ TextUtils.sendMessage(it.command)
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/main/kotlin/com/dulkirfabric/features/NoReverseCam.kt b/src/main/kotlin/com/dulkirfabric/features/NoReverseCam.kt
new file mode 100644
index 0000000..b8cb36d
--- /dev/null
+++ b/src/main/kotlin/com/dulkirfabric/features/NoReverseCam.kt
@@ -0,0 +1,4 @@
+package com.dulkirfabric.features
+
+class NoReverseCam {
+} \ No newline at end of file