Hi. First I have some code PHP: //PlayerMoveEvent is $e$player = $e->getPlayer();foreach($player->getBlocksAround() as $b) {if($b == Block::get(Block::SIGN)) {$player->knockback(/*???*/);}} But this isn't working. I want to boost the player away from the sign. With this code the sign is only detected if the player is over it.
PHP: $level = /*Your level*/$tile = $level->getTiles();foreach ($tile as $sign){if($sign instanceof Sign){ // pocketmine tile sign not blockforeach($level->getNearbyEntities(new AxisAlignedBB($sign->x - 10, $sign->y - 10, $sign->z - 10, $sign->x + 10, $sign->y + 10, $sign->z + 10)) as $ent){if($ent instanceof Player){//knockback entity
Check the block ID rather than checking the equality of the whole object. Block damage may otherwise affect.