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){