From 905259a4e1ccd74dd81423d9071a659288beed60 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 29 Jun 2018 16:38:31 +0100 Subject: [PATCH 1/2] Fixed not being able to place blocks inside dead players closes #2265 --- src/pocketmine/Player.php | 2 +- src/pocketmine/entity/Entity.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 9f7209b97..e9372b2d4 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -535,7 +535,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ } public function canBeCollidedWith() : bool{ - return !$this->isSpectator(); + return !$this->isSpectator() and parent::canBeCollidedWith(); } public function resetFallDistance() : void{ diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 078d84665..ddde4903f 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -1101,7 +1101,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{ } public function canBeCollidedWith() : bool{ - return true; + return $this->isAlive(); } protected function updateMovement(bool $teleport = false) : void{ From a57ec1b1bab6ec545125da285b6384bd397294d0 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 29 Jun 2018 16:49:40 +0100 Subject: [PATCH 2/2] Living: fixed death animation not being played when kill() is used this fixes players having a random delayed despawn when using /kill on themselves --- src/pocketmine/entity/Living.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php index bb39d4c5c..ce0e7a5eb 100644 --- a/src/pocketmine/entity/Living.php +++ b/src/pocketmine/entity/Living.php @@ -557,8 +557,6 @@ abstract class Living extends Entity implements Damageable{ if($this->isAlive()){ $this->applyPostDamageEffects($source); $this->doHitAnimation(); - }else{ - $this->startDeathAnimation(); } } @@ -597,6 +595,7 @@ abstract class Living extends Entity implements Damageable{ public function kill() : void{ parent::kill(); $this->onDeath(); + $this->startDeathAnimation(); } protected function onDeath() : void{