aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2022-01-11 21:25:50 -0500
committerbowser0000 <bowser0000@gmail.com>2022-01-11 21:25:50 -0500
commit836c6a646526649f8bb4e85b4396ff038a5aef9b (patch)
tree358d792bb006c84d483c960efd1ddefa0c62201b /src/main
parentf2cf64f5b1a4894a1e6056efaafff165e41071e2 (diff)
downloadSkyblockMod-836c6a646526649f8bb4e85b4396ff038a5aef9b.tar.gz
SkyblockMod-836c6a646526649f8bb4e85b4396ff038a5aef9b.tar.bz2
SkyblockMod-836c6a646526649f8bb4e85b4396ff038a5aef9b.zip
Fix custom colour crash
Possibly getting value when data is loading into JsonObject
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/me/Danker/features/ColouredNames.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/features/ColouredNames.java b/src/main/java/me/Danker/features/ColouredNames.java
index dfd6d84..f7f4d7a 100644
--- a/src/main/java/me/Danker/features/ColouredNames.java
+++ b/src/main/java/me/Danker/features/ColouredNames.java
@@ -137,7 +137,11 @@ public class ColouredNames {
}
public static String getColourFromName(String name) {
- return "§" + DankersSkyblockMod.data.get("colourednames").getAsJsonObject().get(name).getAsString();
+ try {
+ return "§" + DankersSkyblockMod.data.get("colourednames").getAsJsonObject().get(name).getAsString();
+ } catch (NullPointerException ex) {
+ return EnumChatFormatting.WHITE.toString();
+ }
}
}