Merge branch 'Creeperface01-patch-11'

This commit is contained in:
Intyre 2015-12-20 00:30:15 +01:00
commit 55ce453e17
No known key found for this signature in database
GPG Key ID: B06D41D26935005A

View File

@ -96,13 +96,15 @@ class Cake extends Transparent{
$ev = new EntityRegainHealthEvent($player, 3, EntityRegainHealthEvent::CAUSE_EATING); $ev = new EntityRegainHealthEvent($player, 3, EntityRegainHealthEvent::CAUSE_EATING);
$player->heal($ev->getAmount(), $ev); $player->heal($ev->getAmount(), $ev);
if($this->meta >= 0x06){ if(!$ev->isCancelled()){
$this->getLevel()->setBlock($this, new Air(), true); if($this->meta >= 0x06){
}else{ $this->getLevel()->setBlock($this, new Air(), true);
$this->getLevel()->setBlock($this, $this, true); }else{
} $this->getLevel()->setBlock($this, $this, true);
}
return true; return true;
}
} }
return false; return false;