From 25f236344f86ba5c3b0a63c9a60f1e5c19b37638 Mon Sep 17 00:00:00 2001 From: vytskalt Date: Tue, 9 Apr 2024 22:31:56 +0300 Subject: [PATCH] add missing null check for sidebar line --- .../implementation/sidebar/AbstractSidebar.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/implementation/src/main/java/net/megavex/scoreboardlibrary/implementation/sidebar/AbstractSidebar.java b/implementation/src/main/java/net/megavex/scoreboardlibrary/implementation/sidebar/AbstractSidebar.java index 1d1d5bc..ada1710 100644 --- a/implementation/src/main/java/net/megavex/scoreboardlibrary/implementation/sidebar/AbstractSidebar.java +++ b/implementation/src/main/java/net/megavex/scoreboardlibrary/implementation/sidebar/AbstractSidebar.java @@ -237,7 +237,9 @@ public final boolean tick() { } else if (task instanceof SidebarTask.UpdateScores) { forEachLineHandler(LocaleLineHandler::updateScores); for (GlobalLineInfo line : lines) { - line.updateScore(false); + if (line != null) { + line.updateScore(false); + } } } else if (task instanceof SidebarTask.UpdateTitle) { packetAdapter.sendProperties(internalPlayers(), PropertiesPacketType.UPDATE, title, ObjectiveRenderType.INTEGER, ScoreFormat.blank());