Hey coders, a new code question: How i write text on a sign? Here is an example: PHP: public function eventHandler($data){ if($data->class == TILE_SIGN){ if($data->data["Text1"] === "test"){ //["Text2"]-> "text" } } }
Hi there! Well... I dont know, but I think that @Falk can help you. P.S: I recommend you to start learning the upcomming API of PocketMine 1.4 in order to supoort it: http://docs.pocketmine.net
PHP: public function eventHandler($data){$textLine = 3;//so the text will be on line 3$text = "Hello world!";//classicif($data->class == TILE_SIGN){ if($data->data["Text1"] === "test"){ $data->data["Text".$textLine]=$text; }}} Worked in my plugin.