mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Fixed Time, Death and more event issues
This commit is contained in:
parent
11f4096403
commit
a833d92d76
6 changed files with 96 additions and 59 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue