Skip to content

Commit

Permalink
Merge pull request #264 from srmullaney/main
Browse files Browse the repository at this point in the history
Fixed NPE in the Scoreboard Endpoint
  • Loading branch information
Velyn-N authored Jan 6, 2024
2 parents 4c190b4 + 676a121 commit da5ef1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/io/servertap/api/v1/ServerApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ public class ServerApi {
private final ServerTapMain main;
private final EconomyWrapper economy;
private final org.bukkit.Server bukkitServer = Bukkit.getServer();
private final ScoreboardManager scoreboardManager = Bukkit.getScoreboardManager();
private ScoreboardManager scoreboardManager;
private final LagDetector lagDetector;

public ServerApi(ServerTapMain main, Logger log, LagDetector lagDetector, EconomyWrapper economy) {
this.log = log;
this.main = main;
this.economy = economy;
this.lagDetector = lagDetector;

Bukkit.getScheduler().runTask(main, () -> {
scoreboardManager = Bukkit.getScoreboardManager();
});
}

@OpenApi(
Expand Down

0 comments on commit da5ef1a

Please sign in to comment.