diff options
author | Juuxel <kasperi.kauppi@gmail.com> | 2020-06-24 17:52:49 +0300 |
---|---|---|
committer | Juuxel <kasperi.kauppi@gmail.com> | 2020-06-24 17:52:49 +0300 |
commit | 3b9bccd87e706feece671203f31f1c4db08e1e3b (patch) | |
tree | 19d6856d2527df7f4fbbc490f147647df6fe05c1 /src/main/java | |
parent | 8dd52aa188d587162115b5b1269082878570ea6f (diff) | |
download | LibGui-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/main/java')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java | 2 |
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) { |