Hotfix FightScoreboard
Dieser Commit ist enthalten in:
Ursprung
e770551a91
Commit
83b1f9c6fc
@ -24,6 +24,8 @@ import org.bukkit.scoreboard.DisplaySlot;
|
||||
import org.bukkit.scoreboard.Objective;
|
||||
import org.bukkit.scoreboard.Scoreboard;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@ -35,6 +37,7 @@ class FightScoreboard {
|
||||
|
||||
private static final Scoreboard scoreboard = Objects.requireNonNull(Bukkit.getScoreboardManager()).getMainScoreboard();
|
||||
private static final Objective objective;
|
||||
private static final SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
|
||||
|
||||
private static long startTime = 0;
|
||||
|
||||
@ -57,7 +60,7 @@ class FightScoreboard {
|
||||
objective.getScore("§7??:??:??").setScore(4);
|
||||
} else {
|
||||
long current_time = System.currentTimeMillis() - startTime;
|
||||
objective.getScore("§7" + (current_time / 60000) + ":" + ((current_time / 1000) % 60)).setScore(4);
|
||||
objective.getScore(String.format("§7%02d:%02d", current_time / 60000, (current_time / 1000) % 60)).setScore(4);
|
||||
}
|
||||
objective.getScore("").setScore(3);
|
||||
objective.getScore("§eSpieler").setScore(2);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren