Can you tell the code at the time stepped on the block? Example: if we step on the object and will get a sword or effect Please
PHP: const BLOCKID = Block::STONE;public function onMove(PlayerMoveEvent $event){ if(!$event->getFrom()->equals(($to = $event->getTo()))) if($event->getPlayer()->getLevel()->getBlockIdAt($to->x, $to->y, $to->z) === self::BLOCKID){ $player->getInventory()->addItem(Item::get(Item::DIAMOND_SWORD)); //$player->addEffect(...) } }}