Don't look for lore values that aren't there.

This commit is contained in:
Brianna 2020-04-26 16:30:00 -04:00
parent 815598d0d2
commit 4440aa199b
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ public class InteractListeners implements Listener {
ItemStack item = event.getItem();
Player player = event.getPlayer();
if (!item.hasItemMeta() || !item.getItemMeta().hasLore()) return;
if (!item.hasItemMeta() || !item.getItemMeta().hasLore() || item.getItemMeta().getLore().size() == 0) return;
Kit kit = UltimateKits.getInstance().getKitManager().getKit(ChatColor.stripColor(item.getItemMeta().getLore().get(0).split(" ")[0]));