mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Fixed crash on already dead players, closes #2856
This commit is contained in:
parent
3b6e10b759
commit
414549659a
@ -2592,7 +2592,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
|
||||
$cause = $this->getLastDamageCause();
|
||||
|
||||
switch($cause->getCause()){
|
||||
switch($cause === null ? EntityDamageEvent::CAUSE_CUSTOM : $cause->getCause()){
|
||||
case EntityDamageEvent::CAUSE_ENTITY_ATTACK:
|
||||
if($cause instanceof EntityDamageByEntityEvent){
|
||||
$e = $cause->getDamager();
|
||||
|
Loading…
x
Reference in New Issue
Block a user