From 77eb10263b65dbafac61a5e8ff0be552cd6c4617 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:06:14 +0200 Subject: Fix: Custom Scoreboard Reset Issue (#2252) --- .../config/features/gui/customscoreboard/CustomScoreboardConfig.java | 3 ++- .../skyhanni/config/features/gui/customscoreboard/EventsConfig.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java index bc3dc1fc6..38a749f35 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java @@ -36,7 +36,8 @@ public class CustomScoreboardConfig { @ConfigOption(name = "Reset Appearance", desc = "Reset the appearance of the advanced scoreboard.") @ConfigEditorButton(buttonText = "Reset") public Runnable reset = () -> { - scoreboardEntries = ScoreboardElement.defaultOption; + scoreboardEntries.clear(); + scoreboardEntries.addAll(ScoreboardElement.defaultOption); }; @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/EventsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/EventsConfig.java index 0093b8588..e2663bf55 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/EventsConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/EventsConfig.java @@ -23,7 +23,8 @@ public class EventsConfig { @ConfigOption(name = "Reset Events Priority", desc = "Reset the priority of all events.") @ConfigEditorButton(buttonText = "Reset") public Runnable reset = () -> { - eventEntries = ScoreboardEvent.defaultOption; + eventEntries.clear(); + eventEntries.addAll(ScoreboardEvent.defaultOption); }; @Expose -- cgit