> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/features/enchantments/custom-enchantments/actions.md).

# Actions

All the actions of custom enchantments.

Enchant `actions:` lists are executed in order by the enchant engine. Each line is either a **flow keyword** (`wait`, `return`, `loop`) or a **tag action** of the form `name <tag>value</tag> ...`. Every line is placeholder-parsed and may carry an `if(...)then` prefix.

## [command](/p/features/enchantments/custom-enchantments/actions/command.md)

## [explode](/p/features/enchantments/custom-enchantments/actions/explode.md)

## [executeactions](/p/features/enchantments/custom-enchantments/actions/execute-actions.md)

## [givecurrency](/p/features/enchantments/custom-enchantments/actions/give-currency.md)

## [lightning](/p/features/enchantments/custom-enchantments/actions/lightning.md)

## [particle](/p/features/enchantments/custom-enchantments/actions/particle.md)

## [spawnmob](/p/features/enchantments/custom-enchantments/actions/spawn-mob.md)

## [fill](/p/features/enchantments/custom-enchantments/actions/fill.md)

## [breakblock](/p/features/enchantments/custom-enchantments/actions/break-block.md)

## [addeffect](/p/features/enchantments/custom-enchantments/actions/add-effect.md)

## [cleareffect](/p/features/enchantments/custom-enchantments/actions/clear-effect.md)

## [wait](/p/features/enchantments/custom-enchantments/actions/wait.md)

## [loop](/p/features/enchantments/custom-enchantments/actions/loop.md)

## [return](/p/features/enchantments/custom-enchantments/actions/return.md)

## Conditions — `if(...)then`

Any action line (and any configured command list line, GUI `requirement:`, item lore line or `actionbar.formats` line) can start with a condition:

```
if(<value> <op> <value> [AND <value> <op> <value> ...]) then <action>
```

* Operators: `>`, `<`, `>=`, `<=`, `=`, `!=`.
* Numeric comparison when both sides are numbers; otherwise string equality (only `=` / `!=` are meaningful for strings).
* **All** comparisons found in the condition must pass (AND semantics — there is no OR).
* Values are usually placeholders, resolved before evaluation.

{% hint style="info" %}
The `then` keyword is **optional** when the condition is used as a pure requirement check with nothing to run — e.g. a GUI item `requirement: "if(%edprison_level_pickaxe% >= 10)"`. When there is an action/command/text after the condition, write it after `then`.
{% endhint %}

## Positions

Tags like `pos`, `from` and `to` use the format `world, x, y, z` and accept placeholders, e.g. `<pos>%global.blockworld%, %global.blockx%, %global.blocky%, %global.blockz%</pos>`.

## Default Variables

**%global.playerworld%** -> Gets the world where the player is.\
\&#xNAN;**%global.playerx%** -> Gets the X position of the player.\
\&#xNAN;**%global.playery%** -> Gets the Y position of the player.\
\&#xNAN;**%global.playerz%** -> Gets the Z position of the player.\
\&#xNAN;**%global.blockworld%** -> Gets the world where the block broken was.\
\&#xNAN;**%global.blockx%** -> Gets the X position of the block broken.\
\&#xNAN;**%global.blocky%** -> Gets the Y position of the block broken.\
\&#xNAN;**%global.blockz%** -> Gets the Z position of the block broken.\
\&#xNAN;**%global.playerpitch%** -> Gets the player pitch.\
\&#xNAN;**%global.playeryaw%** -> Gets the player yaw.\
\&#xNAN;**%global.playerface%** -> Gets the player facing (north, south, west, east).\
\&#xNAN;**%global.enchant%** -> Gets the enchant triggered.\
\
\&#xNAN;**%lazy.blocks%** -> Gets the lazy blocks (how many blocks were batched into this trigger). Just for lazy enchantments.\
\&#xNAN;**%exact.times%** -> Gets the trigger count. Just for exact-probability enchants (`blocks-to-trigger`).\
\
\&#xNAN;**%worldguard.region-minx%** -> Gets x position of the worldguard min region position where the player is mining.\
\&#xNAN;**%worldguard.region-miny%** -> Gets y position of the worldguard min region position where the player is mining.\
\&#xNAN;**%worldguard.region-minz%** -> Gets z position of the worldguard min region position where the player is mining.\
\
\&#xNAN;**%worldguard.region-maxx%** -> Gets x position of the worldguard max region position where the player is mining.\
\&#xNAN;**%worldguard.region-maxy%** -> Gets y position of the worldguard max region position where the player is mining.\
\&#xNAN;**%worldguard.region-maxz%** -> Gets z position of the worldguard max region position where the player is mining.

## Variables created by actions

* `givecurrency` / `explode` / `fill` store results as `%<variable>.amount%` / `%<variable>.blocks%` for later lines.
* Entities from `spawnmob` expose positions and callable functions — see [spawnmob](/p/features/enchantments/custom-enchantments/actions/spawn-mob.md).
