Skills Overview
Skills are actions that mobs can perform in response to triggers. They allow you to create dynamic, interactive mob behaviors.
Skill Syntax
Skills follow this format:
<mechanic>{<parameters>} @<targeter> ~<trigger>
Example:
Skills:
- effect:particles{p=flame;amount=10} @self ~onSpawn
- damage{amount=5} @target ~onAttack
Components
Mechanics
The action to perform (damage, particles, sounds, etc.)
Targeters
Who/what the mechanic affects (@self, @target, @playersInRadius{r=10}, etc.)
Triggers
When the skill activates (~onSpawn, ~onAttack, ~onDamaged, etc.)
Available Triggers
| Trigger | Description |
|---|---|
~onSpawn | When the mob spawns |
~onAttack | When the mob attacks an entity |
~onDamaged | When the mob takes damage |
~onDeath | When the mob dies |
~onInteract | When a player right-clicks the mob |
~onShoot | When the mob shoots a projectile |
~onEnterCombat | When entering combat |
~onDropCombat | When exiting combat |
~onTargetChange | When the target changes |
~onSignal:<name> | When receiving a signal |
Common Mechanics
effect:particles
Spawn particles
- effect:particles{p=flame;amount=10;hs=0.2;vs=0.1} @self ~onSpawn
effect:sound
Play a sound
- effect:sound{s=entity.zombie.ambient;v=0.6;p=1.2} @self ~onSpawn
damage
Deal damage to target
- damage{amount=5} @target ~onAttack
message
Send a message
- message{msg="Hello, <target.name>!"} @target ~onInteract
potion
Apply potion effect
- potion{type=SPEED;duration=100;level=1} @self ~onDamaged
Common Targeters
| Targeter | Description |
|---|---|
@self | The mob itself |
@target | The mob's current target |
@trigger | Entity that triggered the skill |
@playersInRadius{r=10} | All players within radius |
@nearestPlayer | Closest player |
@location | A specific location |
Example Mob with Skills
FireDemon:
Type: BLAZE
Display: "&cFire Demon"
Health: 80
Skills:
# Spawn effects
- effect:particles{p=flame;amount=50} @self ~onSpawn
- effect:sound{s=entity.blaze.ambient;v=1.0} @self ~onSpawn
# Combat effects
- effect:particles{p=lava;amount=5} @self ~onAttack
- potion{type=FIRE_RESISTANCE;duration=100} @self ~onDamaged
# Death explosion
- effect:particles{p=explosion;amount=20} @self ~onDeath
Related Pages
- Mechanics - All available mechanics
- Targeters - Targeter reference
- Triggers - Trigger reference
- Conditions - Conditional skill execution