Skip to content

Commit

Permalink
fix nullpointerexception when ingredient is slimefun item but does no…
Browse files Browse the repository at this point in the history
…t have recipe
  • Loading branch information
char3210 committed Aug 14, 2021
1 parent 3810d83 commit 7ece586
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/io/github/seggan/sfcalc/Calculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ private SlimefunItemStack getNextItem(Map<ItemStack, Long> map) {
if(entry.getKey() instanceof SlimefunItemStack) {
SlimefunItemStack ingredient = (SlimefunItemStack)entry.getKey();
if (!plugin.getBlacklistedIds().contains(ingredient.getItemId()) &&
ingredient.getItem() != null &&
!plugin.getBlacklistedRecipes().contains(ingredient.getItem().getRecipeType())) {
if(entry.getValue() > 0) {
return ingredient;
Expand Down

0 comments on commit 7ece586

Please sign in to comment.