diff options
author | ingle <inglettronald@gmail.com> | 2022-10-02 21:52:11 -0500 |
---|---|---|
committer | ingle <inglettronald@gmail.com> | 2022-10-02 21:52:11 -0500 |
commit | 830d3185f6c0c4ac14c957c03e982badb40fa053 (patch) | |
tree | 5cd0acc33220bda733373bb51e70988bf3cb9fa3 /src/main/kotlin/dulkirmod/config | |
parent | 0b4f2ae705585e3978c4f0e4acd2ca772d1d13d7 (diff) | |
download | DulkirMod-830d3185f6c0c4ac14c957c03e982badb40fa053.tar.gz DulkirMod-830d3185f6c0c4ac14c957c03e982badb40fa053.tar.bz2 DulkirMod-830d3185f6c0c4ac14c957c03e982badb40fa053.zip |
Added chat confirmation for join-dungeon command
Diffstat (limited to 'src/main/kotlin/dulkirmod/config')
-rw-r--r-- | src/main/kotlin/dulkirmod/config/Config.kt | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/main/kotlin/dulkirmod/config/Config.kt b/src/main/kotlin/dulkirmod/config/Config.kt index a409d91..f472ee1 100644 --- a/src/main/kotlin/dulkirmod/config/Config.kt +++ b/src/main/kotlin/dulkirmod/config/Config.kt @@ -10,7 +10,7 @@ import java.awt.Color import java.io.File import java.util.function.Consumer -object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod") { +object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", sortingBehavior = ConfigSorting) { @Property( type = PropertyType.SWITCH, @@ -203,6 +203,15 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod") { customSpeed = 0f } + // CUSTOM ANIMATIONS + @Property( + type = PropertyType.SWITCH, + name = "JoinDungeon Command Confirmation", + description = "Chat notification when you push the button. Useful if you suck at navigating a numpad.", + category = "General" + ) + var dungeonCommandConfirm = false + fun init() { initialize() @@ -213,5 +222,13 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod") { "All settings that are related to custom animations. Mostly help from Aton." ) } - + private object ConfigSorting : SortingBehavior() { + override fun getCategoryComparator(): Comparator<in Category> = Comparator { o1, o2 -> + if (o1.name == "General") return@Comparator -1 + if (o2.name == "General") return@Comparator 1 + else compareValuesBy(o1, o2) { + it.name + } + } + } } |