Action Types

All 46 action types available for use in enchantment YAML files. Each action is defined inside the actions section with a unique key and a type field.

actions:
  my_key:
    type: action_type_name
    # ... parameters

potion_effect

Applies a potion effect to the target.

Parameter
Type
Required
Default
Description

effect

string

yes

--

Potion effect type (lowercase, e.g. poison, strength, slowness)

duration

ScalingFunction

yes

--

Duration in ticks (20 ticks = 1 second)

amplifier

ScalingFunction

yes

--

Effect amplifier (0 = level I, 1 = level II, etc.)

particles

boolean

no

true

Show potion particles

icon

boolean

no

true

Show effect icon on HUD

actions:
  poison:
    type: potion_effect
    effect: poison
    duration:
      base: 40
      per_level: 20
    amplifier:
      scaling: fixed
      value: 0
    particles: true
    icon: true

bonus_damage

Deals additional damage or multiplies existing damage.

Parameter
Type
Required
Default
Description

amount

ScalingFunction

yes

--

Damage amount (or multiplier if multiplier is true)

multiplier

boolean

no

false

If true, amount multiplies the existing damage

conditions.sneaking

boolean

no

false

Only activate while sneaking

conditions.night_time

boolean

no

false

Only activate at night

conditions.low_health

double

no

0.0

Only activate below this health

conditions.dimension

string

no

--

Only activate in this dimension (e.g. the_nether)

conditions.target_types

list

no

--

Only activate against these entity types

conditions.passive_mobs

boolean

no

false

Only activate against passive mobs


healthsteal

Steals health from the target and heals the player.

Parameter
Type
Required
Default
Description

amount

ScalingFunction

yes

--

Health points to steal


lightning

Strikes lightning at the target's location.

Parameter
Type
Required
Default
Description

damage

boolean

no

true

Whether the lightning deals damage


teleport

Teleports the player forward in the direction they're looking.

Parameter
Type
Required
Default
Description

range

ScalingFunction

yes

--

Maximum teleport distance in blocks


explosion

Creates an explosion at the target's location.

Parameter
Type
Required
Default
Description

power

ScalingFunction

yes

--

Explosion power

fire

boolean

no

false

Create fire

break_blocks

boolean

no

false

Destroy blocks


velocity

Applies velocity (knockback/launch) to the player or target.

Parameter
Type
Required
Default
Description

direction

string

yes

--

Direction: UP, DOWN, FORWARD, BACKWARD, LOOK, AWAY

power

ScalingFunction

yes

--

Velocity magnitude

apply_to

string

no

SELF

Who to apply to: SELF or TARGET

no_fall_damage

boolean

no

false

Cancel the next fall damage event caused by this launch

Directions:

  • UP / DOWN — absolute vertical

  • FORWARD / BACKWARD — along the player's look direction

  • LOOK — same as FORWARD

  • AWAY — away from the target (requires a resolved target)


shockwave

Pushes nearby entities away from the player.

Parameter
Type
Required
Default
Description

radius

ScalingFunction

yes

--

Effect radius in blocks

power

ScalingFunction

yes

--

Knockback power


set_fire

Sets entities on fire. If radius is set, affects all nearby entities.

Parameter
Type
Required
Default
Description

duration

ScalingFunction

yes

--

Fire duration in ticks

radius

double

no

0.0

Area of effect radius (0 = single target)


glow

Makes the target glow (outline visible through walls).

Parameter
Type
Required
Default
Description

duration

ScalingFunction

yes

--

Glow duration in ticks


disarm

Forces the target player to drop their held item.

No parameters.


break_armor

Damages a random piece of the target player's armor.

Parameter
Type
Required
Default
Description

damage

ScalingFunction

yes

--

Durability damage to apply


thanos

Instantly kills the target with a 50% chance per hit. Only works on entities.

No parameters.


drop_head

Drops the killed entity's head as an item.

No parameters.


cancel_damage

Cancels the incoming damage event. Can be conditional.

Parameter
Type
Required
Default
Description

conditions.low_health

double

no

0.0

Only cancel when player health is at or below this value (0 = always)


attribute_modifier

Applies a persistent attribute modifier while the item is equipped. Used with PASSIVE trigger.

Parameter
Type
Required
Default
Description

attribute

string

yes

--

Attribute name: MAX_HEALTH, MOVEMENT_SPEED, ATTACK_DAMAGE, JUMP_STRENGTH, KNOCKBACK_RESISTANCE, ARMOR_TOUGHNESS

amount

ScalingFunction

yes

--

Modifier amount

operation

string

yes

--

ADD_NUMBER, ADD_SCALAR, or MULTIPLY_SCALAR_1

key

string

yes

--

Unique modifier key

Note: Attribute modifiers are automatically removed when the item is unequipped.


multi_break

Breaks blocks in a radius around the mined block (3x3, 5x5 pattern).

Parameter
Type
Required
Default
Description

radius

ScalingFunction

yes

--

Break radius


autosmelt

Automatically smelts block drops (e.g. iron ore drops iron ingot).

No parameters.


veinmine

Mines connected blocks of the same type.

Parameter
Type
Required
Default
Description

max_blocks

ScalingFunction

yes

--

Maximum blocks to mine


timber

Chops connected log blocks (tree felling).

Parameter
Type
Required
Default
Description

max_blocks

ScalingFunction

yes

--

Maximum blocks to chop


replant

Automatically replants crops after harvesting.

No parameters. Works with wheat, carrots, potatoes, beetroots, and nether wart.


xp_bonus

Multiplies XP dropped from broken blocks.

Parameter
Type
Required
Default
Description

multiplier

ScalingFunction

yes

--

XP multiplier


multi_arrow

Shoots additional arrows alongside the main arrow.

Parameter
Type
Required
Default
Description

extra_arrows

ScalingFunction

yes

--

Number of extra arrows

spread

ScalingFunction

yes

--

Spread angle of extra arrows


explode_projectile

Creates an explosion where the projectile lands.

Parameter
Type
Required
Default
Description

power

ScalingFunction

yes

--

Explosion power

fire

boolean

no

false

Create fire

break_blocks

boolean

no

false

Destroy blocks


fireball_arrow

Replaces arrows with fireballs.

No parameters.


arrow_rain

Spawns a rain of arrows from the sky at the target location.

Parameter
Type
Required
Default
Description

arrows

ScalingFunction

yes

--

Number of arrows

radius

ScalingFunction

yes

--

Spread radius


bonus_drops

Multiplies drops from killed entities, broken blocks, or caught fish.

Parameter
Type
Required
Default
Description

multiplier

ScalingFunction

yes

--

Drop multiplier

crops_only

boolean

no

false

(Block break only) Restrict to crop blocks: wheat, carrots, potatoes, beetroots, nether wart, melon, pumpkin, sugar cane, cocoa, sweet berry bush, pitcher crop, torchflower crop

exclude_seeds

boolean

no

false

(Block break only) Skip seed items when duplicating drops (wheat seeds, beetroot seeds, melon seeds, pumpkin seeds, torchflower seeds, pitcher pod)


magnet

Attracts nearby dropped items to the player.

Parameter
Type
Required
Default
Description

radius

ScalingFunction

yes

--

Pickup radius


consume

Consumes XP from the player to repair the item's durability.

Parameter
Type
Required
Default
Description

amount

ScalingFunction

yes

--

Durability restored per activation


unbreakable

Prevents the item from taking durability damage.

No parameters. Use with PASSIVE trigger and PlayerItemDamageEvent.


hook

Pulls the target entity toward the player (grapple).

Parameter
Type
Required
Default
Description

power

ScalingFunction

yes

--

Pull strength


lava_walker

Converts lava blocks around the player to obsidian temporarily.

Parameter
Type
Required
Default
Description

radius

ScalingFunction

yes

--

Conversion radius

Note: Obsidian reverts to lava after 5 seconds.


feast

Restores hunger/saturation to the player.

Parameter
Type
Required
Default
Description

amount

ScalingFunction

yes

--

Food points to restore


deflect

Deflects incoming projectiles (arrows, etc.) away from the player.

No parameters. Use with TAKE_DAMAGE trigger.


piercing

Allows projectiles to pierce through multiple entities.

Parameter
Type
Required
Default
Description

max_pierces

ScalingFunction

yes

--

Maximum entities to pierce


gravity

Pulls nearby entities toward the player.

Parameter
Type
Required
Default
Description

radius

ScalingFunction

yes

--

Pull radius

power

ScalingFunction

yes

--

Pull strength


auto_reel

Automatically reels in fish and generates loot without needing to reel manually.

No parameters. Use with FISH_BITE trigger.


lifeline

Prevents lethal damage, leaving the player at 1 HP instead.

No parameters. Use with TAKE_DAMAGE trigger.


till

Tills dirt/grass blocks in a radius when using a hoe.

Parameter
Type
Required
Default
Description

radius

ScalingFunction

yes

--

Tilling radius


reflect_damage

Reflects a percentage of incoming melee damage back to the attacker.

Parameter
Type
Required
Default
Description

percentage

ScalingFunction

yes

--

Fraction of damage to reflect (e.g. 0.10 = 10%)

Note: Only works with melee damage (requires EntityDamageByEntityEvent). Does not reduce incoming damage.


command

Runs a server command as the player or as the console.

Parameter
Type
Required
Default
Description

command

string

yes

--

Command to run (without leading /). Supports placeholders.

run_as

string

no

PLAYER

Who runs the command: PLAYER or CONSOLE

Placeholders:

Placeholder
Replaced with

{player}

The player's name

{target}

The target entity's name (empty string if none)

{level}

The enchantment level

Note: PLAYER runs the command with the player's own permissions. Use CONSOLE for commands that require operator-level access.


timer

Repeatedly executes a set of sub-actions on a fixed interval for a set duration. Useful for damage-over-time, sustained effects, or multi-stage abilities.

Parameter
Type
Required
Default
Description

interval

integer (ticks)

no

5

Ticks between each execution (20 ticks = 1 second)

duration

integer (ticks)

no

100

Total ticks to run before stopping

actions

section

yes

--

Sub-actions to run on each tick, same format as top-level actions

Notes:

  • The timer starts immediately when the enchantment triggers and runs asynchronously via the Bukkit scheduler.

  • The timer stops early if the player goes offline.

  • Sub-actions support any action type including nested timer actions.

  • The level passed to sub-actions is the same level as the parent enchantment.


particle

Spawns particles at a specified location. Useful for adding visual feedback to enchantments as an action (rather than the enchant-level particle: section).

Parameter
Type
Required
Default
Description

particle_type

string

yes

--

Particle enum name (e.g. CLOUD, FLAME, ELECTRIC_SPARK)

count

int

no

10

Number of particles to spawn

spread

double

no

0.5

XYZ spread radius

speed

double

no

0.1

Particle speed

location

string

no

SELF

Where to spawn: SELF, TARGET, or BLOCK

Notes:

  • TARGET requires a resolved target entity; if none exists the particle is skipped.

  • BLOCK requires a block in the ActionContext; if none exists the particle is skipped.

  • Particle names match the Bukkit Particle enum (uppercase, e.g. SNOWFLAKE, PORTAL, TOTEM_OF_UNDYING).


sound

Plays a sound at the player's location or at the target's location.

Parameter
Type
Required
Default
Description

sound_type

string

yes

--

Sound registry key in dot notation (e.g. entity.enderman.teleport)

volume

double

no

1.0

Sound volume (0.0–2.0)

pitch

double

no

1.0

Sound pitch (0.5–2.0)

play_at_target

boolean

no

false

If true, plays at the target's location instead of the player's

Notes:

  • Sound keys use Minecraft's dot notation (e.g. entity.generic.explode, block.glass.break). Entity names with underscores keep them (e.g. entity.lightning_bolt.thunder).

  • If play_at_target is true and no target exists, the sound plays at the player's location.


send_message

Sends a MiniMessage-formatted message to the player or to nearby players.

Parameter
Type
Required
Default
Description

message

string

yes

--

MiniMessage text. Supports {player}, {target}, {level} placeholders

radius

double

no

0.0

If > 0, broadcasts to all players within this radius

Notes:

  • {player} is replaced with the enchant-user's name.

  • {target} is replaced with the target entity's name, or empty string if no target.

  • {level} is replaced with the enchantment level.

  • When radius > 0, all online players within that radius receive the message.


spawn_entity

Spawns one or more entities at a specified location.

Parameter
Type
Required
Default
Description

entity_type

string

yes

--

EntityType enum name (e.g. ZOMBIE, SKELETON, WOLF)

count

int

no

1

Number of entities to spawn

location

string

no

SELF

Where to spawn: SELF or TARGET

baby

boolean

no

false

If true, spawns entity as a baby (if the entity supports it)

Notes:

  • Entity names match the Bukkit EntityType enum (uppercase, e.g. CREEPER, WOLF, VILLAGER).

  • baby only applies to entities that implement Ageable (e.g. zombies, cows, pigs).

  • Entities spawn at the exact target location; they behave normally after spawning.

Last updated