Fix ScoreboardManager NPE and added locale messages relating to scoreboards

This commit is contained in:
nossr50
2021-12-27 10:46:56 -08:00
parent 61388f46f1
commit ddc9a69f4b
4 changed files with 22 additions and 3 deletions

View File

@ -574,6 +574,10 @@ public class ScoreboardManager {
PLAYER_SCOREBOARDS.get(playerName).showBoardAndScheduleRevert(seconds * Misc.TICK_CONVERSION_FACTOR);
}
public static boolean isPlayerBoardSetup(@NotNull String playerName) {
return PLAYER_SCOREBOARDS.get(playerName) != null;
}
public static @Nullable ScoreboardWrapper makeNewScoreboard(Player player) {
if(getScoreboardManager() == null)
return null;