{
  "criteria": {
    "hit_entity": {
      "trigger": "minecraft:player_hurt_entity",
      "conditions": {
        "player": [
          {
            "condition": "minecraft:entity_properties",
            "entity": "this",
            "predicate": {
              "slots": {
                "weapon.mainhand": {
                  "predicates": {
                    "minecraft:custom_data": "{hp:true}"
                  }
                }
              }
            }
          }
        ]
      }
    }
  },
  "rewards": {
    "function": "template:hermit_purple/sting"
  }
}