Added more Events and Handlers

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-12 17:01:20 +01:00
parent e4d71949e3
commit d733eb6b4a
5 changed files with 14 additions and 7 deletions

View file

@ -83,7 +83,7 @@ class Entity extends stdClass{
$this->server->api->dhandle("entity.move", $this);
$player = $this->server->query("SELECT EID FROM entities WHERE class == ".ENTITY_PLAYER." AND abs(x - {$this->x}) <= 1.5 AND abs(y - {$this->y}) <= 1.5 AND abs(z - {$this->z}) <= 1.5 LIMIT 1;", true);
if($player !== true and $player !== false){
if($this->server->api->dhandle("player.item.pick", array(
if($this->server->api->dhandle("player.pickup", array(
"eid" => $player["EID"],
"block" => $this->type,
"meta" => $this->meta,