mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Item pickup
This commit is contained in:
parent
57282225d2
commit
518afeae48
2 changed files with 39 additions and 27 deletions
|
|
@ -81,6 +81,8 @@ class Entity extends stdClass{
|
|||
if($player !== true and $player !== false){
|
||||
if($this->server->api->dhandle("player.item.pick", array(
|
||||
"eid" => $player["EID"],
|
||||
"block" => $this->type,
|
||||
"meta" => $this->meta,
|
||||
"target" => $this->eid
|
||||
)) !== false){
|
||||
$this->close();
|
||||
|
|
@ -163,6 +165,7 @@ class Entity extends stdClass{
|
|||
$this->server->query("DELETE FROM entities WHERE EID = ".$this->eid.";");
|
||||
$this->server->api->dhandle("entity.remove", $this->eid);
|
||||
$this->closed = true;
|
||||
unset($this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue