Activator DAMAGE_BY_MOB

This activator works when the player takes damage from any entity.

To create this activator, use the command:

/react add DAMAGE_BY_MOB <ActivatorId> [damager-type:<EntityType>] [damager-name] [entity-type:<EntityType>] [cause:<type>]

Temporary placeholders operating in this activator:

PlaceholderDescription
%damage%Damage the will deal to mob. You can modify this temporary variable using VAR_TEMP_SET action to change value of player damage
%damagertype%The Living Entity type or player who caused damage
%damagername%Mob name or Player name who caused damage
%entitytype%The Entity Type that directly caused damage to the player (arrow, egg, snowball, falling sand, etc.)

Examples

  1. We will forbid to damage the player with any entity:
    /react add DAMAGE_BY_MOB dbm
    /react add dbm a CANCEL_EVENT true
    or
DAMAGE_BY_MOB:
  dbm:
    damager-type: ANY
    damager-name: ''
    entity-type: ANY
    cause: ANY
    flags: []
    actions:
    - 'MESSAGE=Damage: %damage%'
    - 'MESSAGE=Damager Type: %damagertype%'
    - 'MESSAGE=Damager Name: %damagername%'
    - 'MESSAGE=Entity Type: %entitytype%'
    - 'MESSAGE=Cause: %cause%'
    - CANCEL_EVENT=true
    reactions: []