mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Updated triggers to handle or dhandle API method
This commit is contained in:
parent
d7b1ae4b47
commit
b9eca491e8
8 changed files with 43 additions and 44 deletions
|
|
@ -105,7 +105,7 @@ class Player{
|
|||
|
||||
$this->connected = false;
|
||||
if($msg === true){
|
||||
$this->server->trigger("server.chat", $this->username." left the game");
|
||||
$this->server->api->dhandle("server.chat", $this->username." left the game");
|
||||
}
|
||||
console("[INFO] Session with ".$this->ip.":".$this->port." Client ID ".$this->clientID." closed due to ".$reason);
|
||||
$this->server->api->player->remove($this->CID);
|
||||
|
|
@ -303,7 +303,7 @@ class Player{
|
|||
case MC_MOVE_PLAYER:
|
||||
if(is_object($this->entity)){
|
||||
$this->entity->setPosition($data["x"], $data["y"], $data["z"], $data["yaw"], $data["pitch"]);
|
||||
$this->server->trigger("entity.move", $this->eid);
|
||||
$this->server->api->dhandle("entity.move", $this->eid);
|
||||
}
|
||||
break;
|
||||
case MC_PLAYER_EQUIPMENT:
|
||||
|
|
@ -354,7 +354,7 @@ class Player{
|
|||
}
|
||||
break;
|
||||
case MC_ANIMATE:
|
||||
$this->server->trigger("entity.animate", array("eid" => $this->eid, "action" => $data["action"]));
|
||||
$this->server->api->dhandle("entity.animate", array("eid" => $this->eid, "action" => $data["action"]));
|
||||
break;
|
||||
case MC_RESPAWN:
|
||||
$this->entity->setHealth(20, "respawn");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue