mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Fixed Time, Death and more event issues
This commit is contained in:
@ -192,10 +192,10 @@ class Entity extends stdClass{
|
||||
"health" => $this->health,
|
||||
));
|
||||
}
|
||||
if($this->health <= 0){
|
||||
if($this->health <= 0 and $this->dead === false){
|
||||
$this->dead = true;
|
||||
if($this->player !== false){
|
||||
$this->server->trigger("onPlayerDeath", array("name" => $this->name, "cause" => $cause));
|
||||
$this->server->handle("onPlayerDeath", array("name" => $this->name, "cause" => $cause));
|
||||
}
|
||||
}elseif($this->health > 0){
|
||||
$this->dead = false;
|
||||
|
Reference in New Issue
Block a user