mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Entity and TileEntity saving
This commit is contained in:
parent
5c11f48270
commit
2cb7a21b76
3 changed files with 107 additions and 14 deletions
|
|
@ -45,6 +45,9 @@ class TileEntity extends stdClass{
|
|||
$this->class = (int) $class;
|
||||
$this->data = $data;
|
||||
$this->closed = false;
|
||||
if($class === false){
|
||||
$this->closed = true;
|
||||
}
|
||||
$this->name = "";
|
||||
$this->id = (int) $id;
|
||||
$this->x = (int) $x;
|
||||
|
|
@ -68,6 +71,9 @@ class TileEntity extends stdClass{
|
|||
}
|
||||
|
||||
public function spawn($player){
|
||||
if($this->closed){
|
||||
return false;
|
||||
}
|
||||
if(!($player instanceof Player)){
|
||||
$player = $this->server->api->player->get($player);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue