PlayerEvents.respawned((event) => {
  let { player } = event;
  player.potionEffects.add('minecraft:slowness', 250, 2, false, true);
  player.potionEffects.add('minecraft:hunger', 800, 2, false, true);

  player.setFoodLevel(10);
  player.setSaturation(Math.max(2, player.saturation));
});
