mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Placing Signs
This commit is contained in:
parent
df46e241d3
commit
8a5708f47a
5 changed files with 45 additions and 1 deletions
|
|
@ -70,8 +70,22 @@ class TileEntityAPI{
|
|||
public function add($class, $x, $y, $z, $data = array()){
|
||||
$id = $this->tCnt++;
|
||||
$this->server->tileEntities[$id] = new TileEntity($this->server, $id, $class, $x, $y, $z, $data);
|
||||
$this->spawnToAll($id);
|
||||
return $this->server->tileEntities[$id];
|
||||
}
|
||||
|
||||
public function addSign($x, $y, $z, $lines = array("", "", "", "")){
|
||||
return $this->add(TILE_SIGN, $x, $y, $z, $data = array(
|
||||
"id" => "Sign",
|
||||
"x" => $x,
|
||||
"y" => $y,
|
||||
"z" => $z,
|
||||
"Text1" => $lines[0],
|
||||
"Text2" => $lines[1],
|
||||
"Text3" => $lines[2],
|
||||
"Text4" => $lines[3],
|
||||
));
|
||||
}
|
||||
|
||||
public function spawnTo($id, $player){
|
||||
$t = $this->getByID($id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue