mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Improved format constants, fixed cake eating when max health is > 20
This commit is contained in:
@ -90,7 +90,7 @@ class Cake extends Transparent{
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player = null){
|
||||
if($player instanceof Player and $player->getHealth() < 20){
|
||||
if($player instanceof Player and $player->getHealth() < $player->getMaxHealth()){
|
||||
++$this->meta;
|
||||
|
||||
$ev = new EntityRegainHealthEvent($player, 3, EntityRegainHealthEvent::CAUSE_EATING);
|
||||
|
Reference in New Issue
Block a user