Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Commit 99e984d

Browse files
author
dearminder
committed
Merge remote-tracking branch 'upstream/stable' into stable
2 parents 9726378 + ba12a9a commit 99e984d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pocketmine/entity/behavior/MeleeAttackBehavior.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ public function canContinue() : bool{
7373

7474
public function onTick() : void{
7575
$target = $this->mob->getTargetEntity();
76+
77+
if($target === null){
78+
return;
79+
}
7680

7781
$distanceToPlayer = $this->mob->distanceSquared($target);
7882

@@ -117,4 +121,4 @@ public function onEnd() : void{
117121
$this->mob->getNavigator()->clearPath();
118122
}
119123

120-
}
124+
}

0 commit comments

Comments
 (0)