mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-12-25 20:17:38 +01:00
Fixed rare NPE
This commit is contained in:
parent
7303c6b2de
commit
bb3f897312
@ -204,7 +204,9 @@ public class EnchantingListeners extends PluginDependent implements Listener {
|
||||
// Ew
|
||||
this.getPlugin().getScheduler().runLater(() -> {
|
||||
ItemStack item0 = event.getInventory().getItem(0);
|
||||
assert item0 != null;
|
||||
if (item0 == null) {
|
||||
return;
|
||||
}
|
||||
if (item0.getItemMeta() instanceof EnchantmentStorageMeta) {
|
||||
EnchantmentStorageMeta meta = (EnchantmentStorageMeta) item0.getItemMeta();
|
||||
for (Enchantment enchantment : meta.getStoredEnchants().keySet()) {
|
||||
|
Loading…
Reference in New Issue
Block a user