mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 03:47:16 +00:00
Rename Living->callDeathEvent() to Living->onDeath()
This commit is contained in:
parent
67a09a9b16
commit
b06ca6eb0b
@ -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 = [
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user