From 45c67d057afaff54065ea354226bacda09ee7567 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Mon, 17 Feb 2025 21:16:22 -0600 Subject: [PATCH] Fix IDhApiConfigValue.clearValue() failing for some deprecated functions --- .../api/objects/config/DhApiConfigValue.java | 15 ++++++++++++++- .../core/config/types/ConfigEntry.java | 7 +++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/com/seibel/distanthorizons/api/objects/config/DhApiConfigValue.java b/api/src/main/java/com/seibel/distanthorizons/api/objects/config/DhApiConfigValue.java index bbd74d9e1..af0f7c915 100644 --- a/api/src/main/java/com/seibel/distanthorizons/api/objects/config/DhApiConfigValue.java +++ b/api/src/main/java/com/seibel/distanthorizons/api/objects/config/DhApiConfigValue.java @@ -87,7 +87,20 @@ public class DhApiConfigValue implements IDhApiConfigValue extends AbstractConfigType> implem * and any get() method calls will return the apiValue if it is set. */ public final boolean allowApiOverride; + /** Will be null if un-set */ + @Nullable private T apiValue; @@ -132,9 +135,9 @@ public class ConfigEntry extends AbstractConfigType> implem @Override public T get() { - if (allowApiOverride && apiValue != null) + if (this.allowApiOverride && this.apiValue != null) { - return apiValue; + return this.apiValue; } return super.get();