Let's say i wanted to send a player a message when they interact with a sign that has the world "Hello" on a specific line. How would i go about doing that?
Here's how: PHP: public function onTouch(PlayerInteractEvent $event){ $tile = $event->getPlayer()->getLevel()->getTile($event->getBlock()); if($tile instanceof \pocketmine\tile\Sign){ if($tile->getText()[0] === "Hello"){ //code here } }}