diff --git a/src/revivalpmmp/pureentities/entity/monster/FlyingMonster.php b/src/revivalpmmp/pureentities/entity/monster/FlyingMonster.php index 283fe71e..9b52d7db 100644 --- a/src/revivalpmmp/pureentities/entity/monster/FlyingMonster.php +++ b/src/revivalpmmp/pureentities/entity/monster/FlyingMonster.php @@ -126,6 +126,9 @@ public function onUpdate(int $currentTick) : bool{ $this->entityBaseTick($tickDiff); $target = $this->updateMove($tickDiff); + if($player instanceof Player && !$player->isSurvival()) { + return true; + } if($target instanceof Player){ $this->attackEntity($target); }elseif( diff --git a/src/revivalpmmp/pureentities/entity/monster/JumpingMonster.php b/src/revivalpmmp/pureentities/entity/monster/JumpingMonster.php index abd9711b..d20a4caa 100644 --- a/src/revivalpmmp/pureentities/entity/monster/JumpingMonster.php +++ b/src/revivalpmmp/pureentities/entity/monster/JumpingMonster.php @@ -126,6 +126,9 @@ public function onUpdate(int $currentTick) : bool{ $this->entityBaseTick($tickDiff); $target = $this->updateMove($tickDiff); + if($player instanceof Player && !$player->isSurvival()) { + return true; + } if($this->isFriendly()){ if(!($target instanceof Player)){ if($target instanceof Entity){ diff --git a/src/revivalpmmp/pureentities/entity/monster/SwimmingMonster.php b/src/revivalpmmp/pureentities/entity/monster/SwimmingMonster.php index 202d5e4c..eac01d20 100644 --- a/src/revivalpmmp/pureentities/entity/monster/SwimmingMonster.php +++ b/src/revivalpmmp/pureentities/entity/monster/SwimmingMonster.php @@ -126,6 +126,9 @@ public function onUpdate(int $currentTick) : bool{ $this->entityBaseTick($tickDiff); $target = $this->updateMove($tickDiff); + if($player instanceof Player && !$player->isSurvival()) { + return true; + } if($this->isFriendly()){ if(!($target instanceof Player)){ if($target instanceof Entity){ diff --git a/src/revivalpmmp/pureentities/entity/monster/WalkingMonster.php b/src/revivalpmmp/pureentities/entity/monster/WalkingMonster.php index f9663821..3b918e77 100644 --- a/src/revivalpmmp/pureentities/entity/monster/WalkingMonster.php +++ b/src/revivalpmmp/pureentities/entity/monster/WalkingMonster.php @@ -69,6 +69,9 @@ public function checkAndAttackEntity(Entity $player){ return; } } + if(!$player->isSurvival()) { + return; + } $this->attackEntity($player); }