Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
PlayerPingTicker: add a check that objective is null
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFaser committed Jul 27, 2023
1 parent 2f63656 commit 317b0db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/net/flectone/tickers/PlayerPingTicker.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public PlayerPingTicker() {
public void run() {
Bukkit.getOnlinePlayers().parallelStream().forEach(player -> {
Objective objective = FPlayerManager.getScoreBoard().getObjective("ping");
if(objective == null) return;
Score score = objective.getScore(player.getName());

score.setScore(player.getPing());
Expand Down

0 comments on commit 317b0db

Please sign in to comment.