Hello!, I would like to know how and if there is a way to specify with which block the player must interact so that a sentence was executed, for example, in the Interaction Event a Message was sent to the Player only if the Block with which interacts is Grass and also if I can specify which Item to interact with so that the sentence is executed.
PHP: public function onInteract(PlayerInteractEvent $event){ $player = $event->getPlayer(); $item = $event->getItem(); $block = $event->getBlock(); if($item->getId() == yourid){ if($block->getId() == yourblock){ $player->sendMessage("Hello world"); } }} @Minetron26