aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuuxel <kasperi.kauppi@gmail.com>2020-06-24 17:52:49 +0300
committerJuuxel <kasperi.kauppi@gmail.com>2020-06-24 17:52:49 +0300
commit3b9bccd87e706feece671203f31f1c4db08e1e3b (patch)
tree19d6856d2527df7f4fbbc490f147647df6fe05c1 /src
parent8dd52aa188d587162115b5b1269082878570ea6f (diff)
downloadLibGui-3b9bccd87e706feece671203f31f1c4db08e1e3b.tar.gz
LibGui-3b9bccd87e706feece671203f31f1c4db08e1e3b.tar.bz2
LibGui-3b9bccd87e706feece671203f31f1c4db08e1e3b.zip
Fix SyncedGuiDescription.getTitleColor using the client-sided config instance, causing an NPE
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java2
1 files changed, 1 insertions, 1 deletions
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) {