Added TileEntity::setText(1,2,3,4)

This commit is contained in:
Shoghi Cervantes
2013-05-28 23:35:33 +02:00
parent 58fd67d2ed
commit 0d12039623
3 changed files with 33 additions and 22 deletions

View File

@ -218,6 +218,18 @@ class TileEntity extends Position{
break;
}
}
public function setText($line1 = "", $line2 = "", $line3 = "", $line4 = ""){
if($this->class !== TILE_SIGN){
return false;
}
$this->data["Text1"] = $line1;
$this->data["Text2"] = $line2;
$this->data["Text3"] = $line3;
$this->data["Text4"] = $line4;
$this->server->handle("tile.update", $this);
return true;
}
public function close(){
if($this->closed === false){