Skip to content

Commit

Permalink
Null check.
Browse files Browse the repository at this point in the history
  • Loading branch information
aufdemrand committed Nov 13, 2013
1 parent 44e4cb1 commit e5381a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -119,7 +119,7 @@ public ItemScriptContainer(ConfigurationSection configurationSection, String scr
// Check if this recipe uses itemscripts as ingredients,
// or only Bukkit materials
for (String ingredient : ingredients) {
if (!dMaterial.matches(ingredient)) {
if (dMaterial.valueOf(ingredient) == null) {
usesItemscripts = true;
}
}
Expand Down
Expand Up @@ -176,14 +176,15 @@ public void run() {
// and update the inventory the player sees
if (matchesSpecialRecipe) {
inv.setResult(entry.getKey().getItemStack());
// Replace with non-deprecated method once one

// TODO: Replace with non-deprecated method once one
// is added to Bukkit
player.updateInventory();
break;
}
}
}
}, 2);
}, 1);
}

@EventHandler
Expand Down

0 comments on commit e5381a6

Please sign in to comment.