From 688863035586edb8cd9bcf99d4ad74eb5763f449 Mon Sep 17 00:00:00 2001 From: Aria Date: Wed, 18 Dec 2019 19:24:22 +0100 Subject: [PATCH] Clicking an empty anvil result slot no longer errors --- .../api/experience/source/RepairItemExperienceSource.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/Indyuce/mmocore/api/experience/source/RepairItemExperienceSource.java b/src/main/java/net/Indyuce/mmocore/api/experience/source/RepairItemExperienceSource.java index 17e77615..9bb55402 100644 --- a/src/main/java/net/Indyuce/mmocore/api/experience/source/RepairItemExperienceSource.java +++ b/src/main/java/net/Indyuce/mmocore/api/experience/source/RepairItemExperienceSource.java @@ -60,6 +60,7 @@ public class RepairItemExperienceSource extends ExperienceSource { * before getting the amount of durability repaired */ ItemStack old = event.getInventory().getItem(0); + if (old == null || old.getType() == Material.AIR) return; if (old.getType().getMaxDurability() < 30 || item.getType().getMaxDurability() < 10) return;