Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ecad8e2

Browse files
committedFeb 22, 2024
Scoreboard testing
1 parent 17af7a9 commit ecad8e2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ publishing {
2525
create<MavenPublication>("maven") {
2626
groupId = "com.redmagic"
2727
artifactId = "UndefinedAPI"
28-
version = "0.3.60"
28+
version = "0.3.61"
2929

3030
from(components["java"])
3131
}
3232
}
3333
}
3434

3535
group = "com.redmagic"
36-
version = "0.3.60"
36+
version = "0.3.61"
3737

3838
repositories {
3939
mavenCentral()

‎src/main/java/com/redmagic/undefinedapi/scoreboard/UndefinedScoreboard.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import com.redmagic.undefinedapi.extension.createDummy
44
import net.kyori.adventure.text.Component
55
import org.bukkit.Bukkit
66
import org.bukkit.ChatColor
7+
import org.bukkit.scoreboard.DisplaySlot
78
import org.bukkit.scoreboard.Scoreboard
89
import org.bukkit.scoreboard.Team
910

@@ -15,14 +16,15 @@ class UndefinedScoreboard(private val title: Component, private val scoreboard:
1516

1617
constructor(title: String, scoreboard: Scoreboard): this(Component.text(title), scoreboard)
1718

18-
private val objective = scoreboard.createDummy(title.toString())
19+
private val objective = scoreboard.registerNewObjective(title.examinableName(), "dummy")
1920

2021
private var index: Int = 0
2122
private var spaces: Int = 0
2223
private val teamMap: HashMap<Int, Team> = HashMap()
2324

2425
init {
2526
objective.displayName(title)
27+
objective.displaySlot = DisplaySlot.SIDEBAR
2628
}
2729

2830
fun addEmptyLine(): UndefinedScoreboard{

0 commit comments

Comments
 (0)
This repository has been archived.