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); $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;