From 3a24bfb4e8b3026b8f59a4465faadde8f800f075 Mon Sep 17 00:00:00 2001 From: Vixid <52578495+VixidDev@users.noreply.github.com> Date: Tue, 31 Jan 2023 08:24:50 +0000 Subject: Fixes NPE when minion has colour code in name (#573) Co-authored-by: Vixid <52578495+Vixid1@users.noreply.github.com> --- .../miscgui/minionhelper/loaders/MinionHelperChatLoader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/MinionHelperChatLoader.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/MinionHelperChatLoader.java index bef633d2..95277c6a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/MinionHelperChatLoader.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/MinionHelperChatLoader.java @@ -60,6 +60,7 @@ public class MinionHelperChatLoader { String rawTier = ownMatcher.group(1); int tier = Utils.parseRomanNumeral(rawTier); String name = ownMatcher.group(2) + " Minion"; + name = Utils.cleanColour(name); setCrafted(manager.getMinionByName(name, tier)); } @@ -80,7 +81,7 @@ public class MinionHelperChatLoader { } catch (Exception e) { Utils.addChatMessage( - "[NEU] §cMinion Helper failed reading the minion upgrade message. See the logs for more info!"); + "§c[NEU] Minion Helper failed reading the minion upgrade message. See the logs for more info!"); e.printStackTrace(); } } -- cgit