From 3b9bccd87e706feece671203f31f1c4db08e1e3b Mon Sep 17 00:00:00 2001 From: Juuxel Date: Wed, 24 Jun 2020 17:52:49 +0300 Subject: Fix SyncedGuiDescription.getTitleColor using the client-sided config instance, causing an NPE --- src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java index 1193d07..f4ab13e 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java @@ -64,7 +64,7 @@ public class SyncedGuiDescription extends ScreenHandler implements GuiDescriptio } public int getTitleColor() { - return LibGuiClient.config.darkMode ? darkTitleColor : titleColor; + return (world.isClient && LibGuiClient.config.darkMode) ? darkTitleColor : titleColor; } public SyncedGuiDescription setRootPanel(WPanel panel) { -- cgit