mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-23 02:35:25 +01:00
Fixed npe in scoreboard manager
This commit is contained in:
parent
28f3e9aa13
commit
92e2769c55
@ -26,19 +26,21 @@ class Holder {
|
||||
PlaceholderManager placeholderManager = plugin.getPlaceholderManager();
|
||||
ScoreboardManager scoreboardManager = plugin.getScoreboardManager();
|
||||
|
||||
if (!scoreboardManager.isPlayerDisabled(player)) {
|
||||
board.setTitle(driver.getTitle().getLine());
|
||||
|
||||
int count = 0;
|
||||
for(Row row : driver.getRows()) {
|
||||
String line = placeholderManager.parsePlaceholders(player, row.getLine());
|
||||
board.setLine(count, line);
|
||||
count++;
|
||||
if(scoreboardManager != null) {
|
||||
if (!scoreboardManager.isPlayerDisabled(player)) {
|
||||
board.setTitle(driver.getTitle().getLine());
|
||||
|
||||
int count = 0;
|
||||
for(Row row : driver.getRows()) {
|
||||
String line = placeholderManager.parsePlaceholders(player, row.getLine());
|
||||
board.setLine(count, line);
|
||||
count++;
|
||||
}
|
||||
|
||||
this.player.setScoreboard(board.getBoard());
|
||||
} else {
|
||||
this.player.setScoreboard(scoreboardManager.getEmptyScoreboard());
|
||||
}
|
||||
|
||||
this.player.setScoreboard(board.getBoard());
|
||||
} else {
|
||||
this.player.setScoreboard(scoreboardManager.getEmptyScoreboard());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user