Fixed some events

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-12 17:15:59 +01:00
parent d733eb6b4a
commit 4df7aed15d
2 changed files with 4 additions and 2 deletions

View File

@ -503,6 +503,8 @@ class BlockAPI{
++$data2["y"];
$this->server->handle("player.block.place", $data2);
}
$next = $this->server->api->level->getBlockFace($block, $face[(($direction + 2) % 4)]);
var_dump($next);
break;
case 54:
case 61:

View File

@ -92,7 +92,7 @@ class Player{
public function close($reason = "", $msg = true){
if($this->connected === true){
$this->server->dhandle("player.quit", $this);
$this->server->api->dhandle("player.quit", $this);
$reason = $reason == "" ? "server stop":$reason;
$this->save();
$this->eventHandler(new Container("You have been kicked. Reason: ".$reason), "server.chat");
@ -345,7 +345,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->dhandle("player.move", $this->entity);
$this->server->api->dhandle("player.move", $this->entity);
}
break;
case MC_PLAYER_EQUIPMENT: