diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php index dbe4112e3..8993eca5d 100644 --- a/src/pocketmine/entity/Living.php +++ b/src/pocketmine/entity/Living.php @@ -58,7 +58,7 @@ abstract class Living extends Entity implements Damageable{ public abstract function getName(); public function attack($damage, $source = EntityDamageEvent::CAUSE_MAGIC){ - if($this instanceof Player and ($this->getGamemode() & 0x01) === 1 and $source != EntityDamageEvent::CAUSE_MAGIC) { + if($this instanceof Player and ($this->getGamemode() & 0x01) === 1 and $source != EntityDamageEvent::CAUSE_MAGIC and $source != EntityDamageEvent::CAUSE_SUICIDE and $source != EntityDamageEvent::CAUSE_VOID) { return; } //TODO: attack tick limit