aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/features/AliasImpl.kt
blob: 2e552e77bcdbb001144cf499063add198a9934af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.dulkirfabric.features

import com.dulkirfabric.config.DulkirConfig
import com.dulkirfabric.events.chat.ModifyCommandEvent
import meteordevelopment.orbit.EventHandler

object AliasImpl {
    @EventHandler
    fun onCommand(event: ModifyCommandEvent) {
        DulkirConfig.configOptions.aliasList.forEach {
            if (it.alias == event.command) {
                event.command = it.command
            }
        }
    }
}