import { system, world, EffectType } from "@minecraft/server";

system.runInterval(() => {
  world.getPlayers().forEach(player => {
    const blockBelow = player.dimension.getBlock({
      x: player.location.x,
      y: player.location.y - 1,
      z: player.location.z
    });
    if (blockBelow && blockBelow.typeId === "pa:flor_de_rebote") {
      player.runCommand(`effect @s levitation 1 10 true`);
    }
  });
});