Passive Listener Damage - TheComputerGeek2/MagicSpells GitHub Wiki
PassiveSpell
trigger: damage
[!WARNING] Since 4.0 Beta 17.
Properties:
Property | Value |
---|---|
Cancellable | true |
Has Entity Target | true |
Has Location Target | false |
Description:
The listener activates on damage events.
String Format Options:
(Unsupported.)
Section Format Options:
Option | Description | Type | Default | Supports numeric or string expressions |
---|---|---|---|---|
mode |
Must be give or take . |
String | false |
|
damage-types |
List of Damage Types or Damage Type Tags (prepend with # ). |
List | false |
|
indirect-damager |
If true, if the damage is indirect, the causing entity (i.e. an entity that shoots a projectile) is used instead of the direct damaging entity (i.e. a projectile, such as an arrow). | Boolean | true |
false |
minimum-damage |
Specifies the minimum damage (inclusive) needed to fire the trigger. | Double | -1 |
true |
weapon-items |
List of magic item filters for the weapon item. | List of Magic Items | false |
|
projectile-items |
List of magic item filters for a projectile's item. | List of Magic Items | false |
triggers:
- trigger: damage
mode: give
damage-types: ["player_attack", "#bypasses_armor"]
indirect-damager: true
minimum-damage: -1
weapon-items: [diamond_sword]
projectile-items: [arrow]