Minecraft wiki entry for Bad_Omen, associated text: The player can still receive the bad omen effect in peaceful difficulty via commands (all illager captains despawn in peaceful), but does not trigger a raid if in a village.