diff --git a/src/main/java/io/github/silvigarabis/esplitter/ESplitterGui.java b/src/main/java/io/github/silvigarabis/esplitter/ESplitterGui.java index 4cbcbce..81b47e9 100644 --- a/src/main/java/io/github/silvigarabis/esplitter/ESplitterGui.java +++ b/src/main/java/io/github/silvigarabis/esplitter/ESplitterGui.java @@ -581,9 +581,9 @@ public static ItemStack createTextItem(ItemStack item, String... texts){ } public static ItemStack createTextItem(ItemStack item, List textList){ String titleText; - try { + if (textList.size() > 0){ titleText = textList.get(0); - } catch(java.lang.IndexOutOfBoundsException ignored){ + } else { titleText = ""; } List contentList = null;