(@NonNull final Player player, final BoardSettings boardSettings)
| 55 | private boolean ready; |
| 56 | |
| 57 | @SuppressWarnings("deprecation") |
| 58 | public Board(@NonNull final Player player, final BoardSettings boardSettings) { |
| 59 | this.player = player; |
| 60 | this.boardSettings = boardSettings; |
| 61 | this.objective = this.getScoreboard().getObjective("board") == null ? this.getScoreboard().registerNewObjective("board", "dummy") : this.getScoreboard().getObjective("board"); |
| 62 | this.objective.setDisplaySlot(DisplaySlot.SIDEBAR); |
| 63 | this.team = this.getScoreboard().getTeam("board") == null ? this.getScoreboard().registerNewTeam("board") : this.getScoreboard().getTeam("board"); |
| 64 | this.team.setAllowFriendlyFire(true); |
| 65 | this.team.setCanSeeFriendlyInvisibles(false); |
| 66 | this.team.setPrefix(""); |
| 67 | this.team.setSuffix(""); |
| 68 | this.ready = true; |
| 69 | } |
| 70 | |
| 71 | public Scoreboard getScoreboard() { |
| 72 | return (player != null) ? player.getScoreboard() : null; |
nothing calls this directly
no test coverage detected