aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/misc/LicenseViewer.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/features/misc/LicenseViewer.kt')
-rw-r--r--src/main/kotlin/features/misc/LicenseViewer.kt16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/kotlin/features/misc/LicenseViewer.kt b/src/main/kotlin/features/misc/LicenseViewer.kt
index 7a43554..26bec80 100644
--- a/src/main/kotlin/features/misc/LicenseViewer.kt
+++ b/src/main/kotlin/features/misc/LicenseViewer.kt
@@ -6,7 +6,7 @@ import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.Transient
import kotlinx.serialization.json.decodeFromStream
-import net.minecraft.text.Text
+import net.minecraft.network.chat.Component
import moe.nea.firmament.Firmament
import moe.nea.firmament.annotations.Subscribe
import moe.nea.firmament.commands.thenExecute
@@ -31,7 +31,7 @@ object LicenseViewer {
fun hasWebPresence() = webPresence != null
@Bind
- fun webPresence() = Text.literal(webPresence ?: "<no web presence>")
+ fun webPresence() = Component.literal(webPresence ?: "<no web presence>")
@Bind
fun open() {
@@ -39,10 +39,10 @@ object LicenseViewer {
}
@Bind
- fun projectName() = Text.literal(projectName)
+ fun projectName() = Component.literal(projectName)
@Bind
- fun projectDescription() = Text.literal(projectDescription ?: "<no project description>")
+ fun projectDescription() = Component.literal(projectDescription ?: "<no project description>")
@get:Bind("developers")
@Transient
@@ -60,7 +60,7 @@ object LicenseViewer {
) {
@Bind("name")
- fun nameT() = Text.literal(name)
+ fun nameT() = Component.literal(name)
@Bind
fun open() {
@@ -71,7 +71,7 @@ object LicenseViewer {
fun hasWebPresence() = webPresence != null
@Bind
- fun webPresence() = Text.literal(webPresence ?: "<no web presence>")
+ fun webPresence() = Component.literal(webPresence ?: "<no web presence>")
}
@Serializable
@@ -80,7 +80,7 @@ object LicenseViewer {
val licenseUrl: String? = null
) {
@Bind("name")
- fun nameG() = Text.literal(licenseName)
+ fun nameG() = Component.literal(licenseName)
@Bind
fun open() {
@@ -91,7 +91,7 @@ object LicenseViewer {
fun hasUrl() = licenseUrl != null
@Bind
- fun url() = Text.literal(licenseUrl ?: "<no link to license text>")
+ fun url() = Component.literal(licenseUrl ?: "<no link to license text>")
}
data class LicenseList(