From d9171f7557d00d6d53de8a33bc00bc39c40f32b6 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Thu, 2 May 2024 19:22:19 +0200 Subject: meta: Fix §f in item names (#1145) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java index 041843ae..b2db6598 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java @@ -117,6 +117,9 @@ public class NEUItemEditor extends GuiScreen { options.add(new GuiElementText("Display name: ", Color.WHITE.getRGB())); String displayName = item.has("displayname") ? item.get("displayname").getAsString() : ""; + if (displayName.startsWith("§f§f")) { + displayName = displayName.substring(4); + } this.displayName = addTextFieldWithSupplier(displayName, COLOUR); options.add(new GuiElementText("Lore: ", Color.WHITE.getRGB())); -- cgit