Enable death through void, suicide

This commit is contained in:
williamtdr 2014-07-11 09:18:15 -05:00
parent 61043d2e0d
commit 5e47dda0a8

View File

@ -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