Hello, how can I check the block under a player with an task if the player have under his feed for 5 seconds the same block an action will be executed like $p->kick
PHP: $block = $player->getLevel()->getBlock(new Vector3($player->x, $player->y - 0.5, $player->z));if($block->getId() === Block::theBlockYouWant){// Do something} While $player is your player. Put that in your Task.
You can check the code I used to BlockEffects. https://github.com/GmWM/PocketMine-...ts/src/GmWM/BlockEffects/BlockEffects.php#L71