Skip to content

Commit

Permalink
Reset event variables properly
Browse files Browse the repository at this point in the history
Probably fixes #1339
  • Loading branch information
Morphan1 committed Mar 12, 2016
1 parent 24cb66a commit 6947427
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Expand Up @@ -139,6 +139,7 @@ public void onCraftItem(CraftItemEvent event) {
}
}
this.player = dEntity.getPlayerFrom(humanEntity);
this.resultChanged = false;
fire();
if (cancelled) {
event.setCancelled(true);
Expand Down
Expand Up @@ -135,6 +135,7 @@ public void onPlayerPicksUp(PlayerPickupItemEvent event) {
item = new dItem(itemEntity.getItemStack());
entity = new dEntity(itemEntity);
cancelled = event.isCancelled();
itemChanged = false;
this.event = event;
fire();
if (itemChanged) {
Expand Down
Expand Up @@ -216,6 +216,7 @@ public void specialRecipeClick(InventoryClickEvent event) {
}
scriptEvent.recipe = recipeList;
scriptEvent.player = dPlayer.mirrorBukkitPlayer(player);
scriptEvent.resultChanged = false;
scriptEvent.fire();
if (scriptEvent.cancelled) {
event.setCancelled(true);
Expand Down

0 comments on commit 6947427

Please sign in to comment.