mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-22 19:06:35 +00:00
Enable death through void, suicide
This commit is contained in:
parent
61043d2e0d
commit
5e47dda0a8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user