Mechanic

cancelEvent

Cancels the calling event

Examples & Notes

Examples

Skill.yml:

CancelDamageEvent:
  Skills:
  - CancelEvent
  - message{m="&cYou cannot hurt this mob!"} @trigger

Mob.yml:

NoDamageMob:
  Type: villager
  Skills:
  - skill{s=CancelDamageEvent;sync=true} ~onDamaged

You can use it in-line too! This example will prevent the mob from shooting its bow, and from taking any damage.

customskeleton:
  Type: skeleton
  Skills:
  - cancelevent{sync=true} @self ~onShoot
  - cancelevent{sync=true} @self ~onDamaged

Universal Mechanic Options

Author:
Ashijin
Generated from @Mythic* annotations in the MythicMobs source.