mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +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());
|
$this->sendRespawnPacket($this->getSpawn());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function callDeathEvent(){
|
protected function onDeath(){
|
||||||
$message = "death.attack.generic";
|
$message = "death.attack.generic";
|
||||||
|
|
||||||
$params = [
|
$params = [
|
||||||
|
@ -441,10 +441,10 @@ abstract class Living extends Entity implements Damageable{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
parent::kill();
|
parent::kill();
|
||||||
$this->callDeathEvent();
|
$this->onDeath();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function callDeathEvent(){
|
protected function onDeath(){
|
||||||
$this->server->getPluginManager()->callEvent($ev = new EntityDeathEvent($this, $this->getDrops()));
|
$this->server->getPluginManager()->callEvent($ev = new EntityDeathEvent($this, $this->getDrops()));
|
||||||
foreach($ev->getDrops() as $item){
|
foreach($ev->getDrops() as $item){
|
||||||
$this->getLevel()->dropItem($this, $item);
|
$this->getLevel()->dropItem($this, $item);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user