{
  "criteria": {
    "requirement": {
      "trigger": "minecraft:player_hurt_entity",
      "conditions": {
        "player": [
          {
            "condition": "minecraft:reference",
            "name": "survivalplus:illagerhat"
          }
        ],
        "entity": {
          "type": "#survivalplus:illagerhostiles"
        }
      }
    }
  },
  "rewards": {
    "function": "survivalplus:tools/ability_hats/illagerhit"
  }
}