From bd216f966fb7fcbab950c40e50a66f06e3af5478 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 11 Feb 2023 21:49:48 +0900 Subject: - Fix NPE on first launching with text configs Signed-off-by: syeyoung --- .../kr/syeyoung/dungeonsguide/mod/features/richtext/TextHUDFeature.java | 1 + 1 file changed, 1 insertion(+) (limited to 'mod/src/main/java') diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/richtext/TextHUDFeature.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/richtext/TextHUDFeature.java index 40a990cf..bfa4fab5 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/richtext/TextHUDFeature.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/richtext/TextHUDFeature.java @@ -142,6 +142,7 @@ public abstract class TextHUDFeature extends AbstractHUDFeature { private Map styleMap = new HashMap<>(); public void registerDefaultStyle(String name, DefaultingDelegatingTextStyle style) { defaultStyleMap.put(name, style); + styleMap.put(name, DefaultingDelegatingTextStyle.derive("User Setting of "+name, () -> defaultStyleMap.get(name))); } public DefaultingDelegatingTextStyle getStyle(String name) { return styleMap.get(name); -- cgit