diff options
Diffstat (limited to 'src/main')
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 |