From 8259123d98be81aa60afa0720083c4ffa7313c4a Mon Sep 17 00:00:00 2001 From: Auxilor Date: Sat, 23 Jan 2021 16:56:46 +0000 Subject: [PATCH] Added empty line check --- .../willfp/ecoenchants/enchantments/util/HoldItemListener.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/HoldItemListener.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/HoldItemListener.java index 10fa3dd5..9786d218 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/HoldItemListener.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/HoldItemListener.java @@ -60,6 +60,9 @@ public class HoldItemListener implements Listener { EcoEnchant enchant; int level; String[] lineSplit = line.split(" "); + if (lineSplit.length == 0) { + continue; + } if (lineSplit.length == 1) { enchant = EcoEnchants.getByName(lineSplit[0]); level = 1;