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