diff options
author | bowser0000 <bowser0000@gmail.com> | 2022-01-11 21:25:50 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2022-01-11 21:25:50 -0500 |
commit | 836c6a646526649f8bb4e85b4396ff038a5aef9b (patch) | |
tree | 358d792bb006c84d483c960efd1ddefa0c62201b /src/main | |
parent | f2cf64f5b1a4894a1e6056efaafff165e41071e2 (diff) | |
download | SkyblockMod-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.java | 6 |
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(); + } } } |