Skip to content

Commit

Permalink
fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Mar 6, 2024
1 parent ca59adc commit 84e7efd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public ItemCheckResult checkItem(ItemStack itemStack) {

@Override
public void takeAction(ItemStack itemStack, ItemCheckResult result) {
itemStack.editMeta(meta -> meta.displayName(null));
if (result != ItemCheckResult.FINE) {
itemStack.editMeta(meta -> meta.displayName(null));
}
}

@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
Expand Down

0 comments on commit 84e7efd

Please sign in to comment.