Try to fix disappearing xp battle scoreboards
This commit is contained in:
@@ -42,6 +42,7 @@ import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.material.Stairs;
|
||||
import org.bukkit.scoreboard.Scoreboard;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class Setup {
|
||||
@@ -297,4 +298,14 @@ public class Setup {
|
||||
Errors.reportException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void setupXPBattle() {
|
||||
Scoreboard s = Bukkit.getScoreboardManager().getMainScoreboard();
|
||||
if (s.getObjective("xpBattleStart") == null) {
|
||||
s.registerNewObjective("xpBattleStart", "dummy");
|
||||
s.registerNewObjective("xpBattleJoin", "dummy");
|
||||
s.registerNewObjective("xpBattleEnd", "dummy");
|
||||
s.registerNewObjective("xpBattleIngame", "dummy");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user