From 55019c51ede0f1a83606f3d619e020d0de1677bd Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 17 Jun 2023 21:52:52 -0500 Subject: [PATCH] Fix Config setApi not firing listeners --- .../distanthorizons/core/config/types/ConfigEntry.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/types/ConfigEntry.java b/core/src/main/java/com/seibel/distanthorizons/core/config/types/ConfigEntry.java index a0a3a7ede..f18196eb5 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/types/ConfigEntry.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/types/ConfigEntry.java @@ -56,7 +56,11 @@ public class ConfigEntry extends AbstractConfigType> implem public T getDefaultValue() { return this.defaultValue; } @Override - public void setApiValue(T newApiValue) { this.apiValue = newApiValue; } + public void setApiValue(T newApiValue) + { + this.apiValue = newApiValue; + this.listenerList.forEach(IConfigListener::onConfigValueSet); + } @Override public T getApiValue() { return this.apiValue; } @Override