Posibility of changing data for handlers, and canceling it

This commit is contained in:
Shoghi Cervantes Pueyo
2012-12-25 20:15:08 +01:00
parent bf24a937b2
commit 504b37cfaa
7 changed files with 72 additions and 21 deletions

View File

@ -220,7 +220,7 @@ class Entity extends stdClass{
if($this->health <= 0 and $this->dead === false){
$this->dead = true;
if($this->player !== false){
$this->server->handle("onPlayerDeath", array("name" => $this->name, "cause" => $cause));
$this->server->handle("player.death", array("name" => $this->name, "cause" => $cause));
}
}elseif($this->health > 0){
$this->dead = false;