Skip to content

Commit

Permalink
Fix weird things happening in craft event
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 31, 2015
1 parent 3f3db5c commit f66f714
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Expand Up @@ -165,6 +165,9 @@ public void craftItemEvent(PrepareItemCraftEvent event) {
context.put("inventory", new dInventory(inventory));

Recipe recipe = event.getRecipe();
if (recipe == null) {
return;
}
dItem result = recipe.getResult() != null ? new dItem(recipe.getResult()) : null;
if (result != null) {
context.put("item", result);
Expand Down
Expand Up @@ -73,7 +73,6 @@ public static void playMidi(File file, float tempo, float volume, dLocation loca
public static void stopMidi(String object) {
if (receivers.containsKey(object)) {
receivers.get(object).close();
receivers.remove(object);
}
}

Expand Down

0 comments on commit f66f714

Please sign in to comment.