Skip to content

Commit

Permalink
Solid line (not bumping version yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephendotgg committed Nov 8, 2023
1 parent 36491ac commit 1e18156
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ repositories {
includeGroup("org.spigotmc")
}
}
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://oss.sonatype.org/content/repositories/central")
}

dependencies {
compileOnly("org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT")
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
implementation("io.github.cdimascio:dotenv-kotlin:6.4.1")
implementation("org.mongodb:mongodb-driver-sync:4.9.0")
implementation("com.google.code.gson:gson:2.10.1")
Expand Down
18 changes: 18 additions & 0 deletions src/main/kotlin/gg/flyte/twilight/extension/Component.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package gg.flyte.twilight.extension

import net.kyori.adventure.text.Component
import net.kyori.adventure.text.TextComponent
import net.kyori.adventure.text.format.TextDecoration

/**
* Generates a Component that visually represents a solid line.
*
* The solid line is the perfect width to fit a default Minecraft chat bar.
* It is composed of whitespace characters, which are then decorated with
* a strikethrough, giving the appearance of a solid line.
*
* @return A TextComponent that visually represents a solid line.
*/
fun Component.solidLine(): TextComponent {
return Component.text(" ").decorate(TextDecoration.STRIKETHROUGH)
}

0 comments on commit 1e18156

Please sign in to comment.