From 6dcaf1ffdf688db652172c0bb9be41e9be705892 Mon Sep 17 00:00:00 2001 From: Silvigarabis <73000464+Silvigarabis@users.noreply.github.com> Date: Fri, 5 Jan 2024 02:21:16 +0800 Subject: [PATCH] =?UTF-8?q?gui:=20=E5=BB=B6=E8=BF=9F=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8C=89=E9=92=AE=EF=BC=9B=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=89=A9=E5=93=81=E7=94=9F=E6=88=90=E5=87=BD=E6=95=B0=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=AD=A3=E7=A1=AE=E8=AE=BE=E7=BD=AE=E7=89=A9=E5=93=81?= =?UTF-8?q?=E5=90=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../silvigarabis/esplitter/ESplitterController.java | 10 +++++----- .../io/github/silvigarabis/esplitter/ESplitterGui.java | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/io/github/silvigarabis/esplitter/ESplitterController.java b/src/main/java/io/github/silvigarabis/esplitter/ESplitterController.java index 75c6acb..c90f7de 100644 --- a/src/main/java/io/github/silvigarabis/esplitter/ESplitterController.java +++ b/src/main/java/io/github/silvigarabis/esplitter/ESplitterController.java @@ -34,17 +34,17 @@ public final class ESplitterController { //private WeakHashMap controllers = new WeakMap(); - protected Player player; + protected Player player = null; protected List notifications = new ArrayList(); - protected ItemStack selectedItem; + protected ItemStack selectedItem = null; - protected Map enchantments; + protected Map enchantments = null; - protected List enchantSetList; + protected List enchantSetList = null; - private ESplitterGui gui; + private ESplitterGui gui = null; public ESplitterController(Player player){ if (!ESplitterPlugin.isConfigured()){ diff --git a/src/main/java/io/github/silvigarabis/esplitter/ESplitterGui.java b/src/main/java/io/github/silvigarabis/esplitter/ESplitterGui.java index b78ca9c..e6c9126 100644 --- a/src/main/java/io/github/silvigarabis/esplitter/ESplitterGui.java +++ b/src/main/java/io/github/silvigarabis/esplitter/ESplitterGui.java @@ -117,8 +117,6 @@ public ESplitterGui(ESplitterController ctrl){ buildBorder(); buildLine(); - - buildMiscButton(); } public void buildBorder(){ @@ -347,6 +345,7 @@ public void closeGui(){ public void setSelectedItem(ItemStack item){ this.itemStacks.put(selectedItemIndex, item != null ? item.clone() : null); + buildMiscButton(); this.update(); } @@ -585,11 +584,12 @@ public static ItemStack createTextItem(ItemStack item, String... texts){ return createTextItem(item, textList); } public static ItemStack createTextItem(ItemStack item, List textList){ - String titleText = ""; + String titleText = null; if (textList.size() > 0){ titleText = textList.get(0); - } else { - titleText = null; + } + if (titleText != null){ + titleText = "§r§f" + titleText; } List contentList = null; if (textList.size() > 1){