diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index 8ef5433e0..94d8dd10f 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -315,22 +315,22 @@ object LorenzUtils { isCurrent: (T) -> Boolean, onChange: (T) -> Unit, ) { - val newList = mutableListOf<Any>() - newList.add(prefix) - for (entry in values) { - val display = getName(entry) - if (isCurrent(entry)) { - newList.add("§a[$display]") - } else { - newList.add("§e[") - newList.add(Renderable.link("§e$display") { - onChange(entry) - }) - newList.add("§e]") + add(buildList { + add(prefix) + for (entry in values) { + val display = getName(entry) + if (isCurrent(entry)) { + add("§a[$display]") + } else { + add("§e[") + add(Renderable.link("§e$display") { + onChange(entry) + }) + add("§e]") + } + add(" ") } - newList.add(" ") - } - add(newList) + }) } // TODO nea? |