Minecraft wiki entry for Village, associated text: A player who kills an illager captain (found in an outpost or a patrol) receives the Bad Omen effect for 100 minutes. Like other status effects, Bad Omen can also be cleared by dying or drinking milk. Entering a village boundary while the effect is active triggers a raid, in which groups of illagers spawn and attack the village. Killing multiple captains in Java Edition gives the player a higher level of Bad Omen, and the higher the level, the higher the chance for the raiding mobs to wield enchanted weapons.