📝 Fix default scoreboard config

This commit is contained in:
Maxlego08 2025-02-15 18:53:53 +01:00
parent 3cf3407a2e
commit c4585b2ef8
4 changed files with 38 additions and 7 deletions

View File

@ -1,6 +1,7 @@
# Unreleased
- Fix command description
- Fix default koth create scoreboard. You now have a real configuration that will be created
# 3.1.0

View File

@ -75,6 +75,13 @@
</relocations>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
@ -238,8 +245,8 @@
</dependency>
</dependencies>
<properties>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -123,8 +123,8 @@ public class ZKoth extends ZUtils implements Koth {
this.captureSeconds = captureSeconds;
this.minLocation = minLocation;
this.maxLocation = maxLocation;
this.startScoreboard = new ScoreboardConfiguration();
this.cooldownScoreboard = new ScoreboardConfiguration();
this.startScoreboard = ScoreboardConfiguration.start();
this.cooldownScoreboard = ScoreboardConfiguration.cooldown();
this.cooldownStart = 300;
this.stopAfterSeconds = 3600;
this.enableStartCapMessage = true;

View File

@ -1,6 +1,6 @@
package fr.maxlego08.koth.api.utils;
import java.util.Collections;
import java.util.Arrays;
import java.util.List;
public class ScoreboardConfiguration {
@ -15,8 +15,31 @@ public class ScoreboardConfiguration {
this.lines = lines;
}
public ScoreboardConfiguration() {
this(false, "zKoth", Collections.singletonList("Default Configuration"));
public static ScoreboardConfiguration cooldown() {
return new ScoreboardConfiguration(true, "&f&l &7&oZkoth &f&l ", Arrays.asList(
"&r",
"#16db47Location:",
" #636363 #ffffffX: %centerX% Y: %centerY% Z: %centerZ%",
"&r",
"#16db47Starts in:",
" #636363 #ffffff%spawnFormat%",
"&r"
));
}
public static ScoreboardConfiguration start() {
return new ScoreboardConfiguration(true, "&f&l &7&oZkoth &f&l ", Arrays.asList(
"&r",
"#16db47Location",
" #636363 #ffffffX: %centerX% Y: %centerY% Z: %centerZ%",
"&r",
"#16db47Player:",
" #636363 #ffffff%playerName%",
"&r",
"#16db47Time left:",
" #636363 #ffffff%captureFormat%",
"&r"
));
}
public boolean isEnable() {