Merge branch 'patch-11' of https://github.com/Creeperface01/PocketMine-MP into Creeperface01-patch-11

This commit is contained in:
Intyre 2015-12-20 00:28:50 +01:00
commit e4ab7a08ec
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);
$player->heal($ev->getAmount(), $ev);
if($this->meta >= 0x06){
$this->getLevel()->setBlock($this, new Air(), true);
}else{
$this->getLevel()->setBlock($this, $this, true);
}
if(!$ev->isCancelled()){
if($this->meta >= 0x06){
$this->getLevel()->setBlock($this, new Air(), true);
}else{
$this->getLevel()->setBlock($this, $this, true);
}
return true;
return true;
}
}
return false;