aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/chat/CopyChat.kt
blob: 5c46465316148e1c1a006d1148b3ef2704814716 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package moe.nea.firmament.features.chat

import net.minecraft.text.OrderedText
import moe.nea.firmament.util.data.Config
import moe.nea.firmament.util.data.ManagedConfig
import moe.nea.firmament.util.reconstitute


object CopyChat {
	val identifier: String
		get() = "copy-chat"

	@Config
	object TConfig : ManagedConfig(identifier, Category.CHAT) {
		val copyChat by toggle("copy-chat") { false }
	}

	fun orderedTextToString(orderedText: OrderedText): String {
		return orderedText.reconstitute().string
	}
}