From b06ca6eb0ba4c13a774e43b404ea4c07da6777db Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 7 Dec 2017 12:26:49 +0000 Subject: [PATCH] Rename Living->callDeathEvent() to Living->onDeath() --- src/pocketmine/Player.php | 2 +- src/pocketmine/entity/Living.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 99c3d34d6..fcc03c7b1 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -3457,7 +3457,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ $this->sendRespawnPacket($this->getSpawn()); } - protected function callDeathEvent(){ + protected function onDeath(){ $message = "death.attack.generic"; $params = [ diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php index f3f219582..bed8a5918 100644 --- a/src/pocketmine/entity/Living.php +++ b/src/pocketmine/entity/Living.php @@ -441,10 +441,10 @@ abstract class Living extends Entity implements Damageable{ return; } parent::kill(); - $this->callDeathEvent(); + $this->onDeath(); } - protected function callDeathEvent(){ + protected function onDeath(){ $this->server->getPluginManager()->callEvent($ev = new EntityDeathEvent($this, $this->getDrops())); foreach($ev->getDrops() as $item){ $this->getLevel()->dropItem($this, $item);