Fixed NPE from broken item type.

This commit is contained in:
BadBones69 2020-01-26 06:36:04 -05:00
parent 3bdf44cbce
commit aee801658c

View File

@ -56,7 +56,7 @@ public class GUI implements Listener {
if (data.contains("Items")) {
for (String i : data.getConfigurationSection("Items").getKeys(false)) {
List<String> lore = new ArrayList<>();
if (cat.getItems().contains(data.getItemStack("Items." + i + ".Item").getType()) || cat == Category.NONE) {
if (data.getItemStack("Items." + i + ".Item") != null && (cat.getItems().contains(data.getItemStack("Items." + i + ".Item").getType()) || cat == Category.NONE)) {
if (data.getBoolean("Items." + i + ".Biddable")) {
if (sell == ShopType.BID) {
String seller = data.getString("Items." + i + ".Seller");