Skip to content

Commit

Permalink
Add exception for MILK_BUCKET.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Jul 25, 2014
1 parent 552beed commit 2257ac2
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -224,7 +224,6 @@ public final void onPlayerInteract(final PlayerInteractEvent event) {

boolean resetAll = false;


if (event.hasItem()){
final ItemStack item = event.getItem();
final Material type = item.getType();
Expand All @@ -234,7 +233,7 @@ public final void onPlayerInteract(final PlayerInteractEvent event) {
// It was a bow, the player starts to pull the string, remember this time.
data.instantBowInteract = (data.instantBowInteract > 0 && now - data.instantBowInteract < 800) ? Math.min(System.currentTimeMillis(), data.instantBowInteract) : System.currentTimeMillis();
}
else if (type.isEdible() || type == Material.POTION) {
else if (type.isEdible() || type == Material.POTION || type == Material.MILK_BUCKET) {
final long now = System.currentTimeMillis();
// It was food, the player starts to eat some food, remember this time and the type of food.
data.instantEatFood = type;
Expand Down

0 comments on commit 2257ac2

Please sign in to comment.