> ## Documentation Index
> Fetch the complete documentation index at: https://items.lodemc.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrations

> Protection plugins, WorldEdit, MythicMobs, ModelEngine and PlaceholderAPI.

None of these are required. Each hook switches on by itself when its plugin is installed.

## LodeEntities

LodeEntities is our own plugin for custom mobs, models and skills, and the two plugins are built to work together. They connect **both ways**:

* LodeItems items, blocks and props can **run LodeEntities skills** from their [events](https://items.lodemc.net/events.md).
* LodeEntities skills can **give LodeItems items and place LodeItems blocks**.

Install both and it switches on by itself. The console says `LodeEntities: [lode-skill]/[lode] actions and lodegive/lodeblock mechanics are available.` when it's ready.

### Running skills from LodeItems

Two [actions](https://items.lodemc.net/events.md) run LodeEntities effects:

| Action | Runs |
| - | - |
| `[lode-skill] <skill> [key=value ...]` | A whole LodeEntities skill, by its id |
| `[lode] <effect line>` | One LodeEntities effect line, written the same way as inside a skill |

```yaml items/weapons/storm_blade.yml theme={null}
storm_blade:
  material: diamond_sword
  texture: storm_blade.png
  events:
    right-click:
      cooldown: 5s
      actions:
        - "[lode-skill] lightning_strike power=3"
```

```yaml items/blocks/cursed_ore.yml theme={null}
cursed_ore:
  type: block
  texture: cursed_ore.png
  events:
    break:
      actions:
        - "[lode-skill] summon_guardians"
```

**Who casts the skill** depends on what the event belongs to:

* **An item** (`right-click`, `attack`, `consume`...): the player holding it is the caster. On `attack` and `kill`, the hit mob is the target.
* **A placed block or prop** (`interact`, `place`, `break`): the skill has **no caster**. It's cast from the middle of the block, so `@origin` and radius targeters centre on the block, and the player who triggered it is `@trigger`.

**What the skill knows.** Every skill run from LodeItems gets these values, read as `<skill.name>` inside the skill:

| Value | What it is |
| - | - |
| `<skill.id>` (also `<skill.item>`, `<skill.block>`) | The LodeItems id whose event ran, like `lodeitems:cursed_ore` |
| `<skill.event>` | The trigger, like `break` or `right-click` |
| `<skill.x>`, `<skill.y>`, `<skill.z>`, `<skill.world>` | Where it happened (the block, or the player for items) |
| `<skill.player>` | The player's name |

Anything you add as `key=value` after the skill id is passed the same way: `power=3` above is `<skill.power>`. Your own values override the built-in ones with the same name.

LodeItems checks the skill ids and effect lines when it loads, and warns about a skill LodeEntities doesn't know or a line it can't read. A skill added to LodeEntities later still works, since the skill is looked up again each time it runs. After `/lodeitems reload`, effect lines are read again, so changes on the LodeEntities side are picked up too.

### LodeItems mechanics in LodeEntities

LodeItems adds two mechanics that any LodeEntities skill can use:

**lodegive** `mechanic`

Gives each targeted player a LodeItems item. Items that don't fit are dropped at their feet. When the targets are locations instead of entities, the item is dropped there.

```text theme={null}
lodegive{item=ruby;amount=2}
```

`item` (also `i`, `id`) is the item id; `ruby` means `lodeitems:ruby`, `myserver:ruby` sets the namespace. `amount` (also `a`) defaults to 1. Also called `lodeitems-give` and `lodeitem`.

**lodeblock** `mechanic`

Places a LodeItems block at each target: at an entity's feet, or at each targeted location.

```text theme={null}
lodeblock{block=ruby_ore}
```

`block` (also `b`, `id`) is the block id. The block is placed in its default direction and replaces whatever was there. Also called `lodeitems-block` and `lodesetblock`.

For example, a boss that drops rubies on death and leaves a crystal behind:

```text theme={null}
- lodegive{item=ruby;amount=5} @PlayersInRadius{r=20}
- lodeblock{block=boss_crystal} @origin
```

> [!NOTE]
>
> Without LodeEntities, `[lode-skill]` and `[lode]` actions do nothing, and loading warns about each one. Everything else still loads.

## Protection plugins

WorldGuard, Towny, Lands, GriefPrevention, PlotSquared, BentoBox and others work **without a hook**. Placing and breaking custom blocks and props fires the same events as vanilla blocks, so their rules apply. Using a prop (sitting, opening storage) is checked like right-clicking a block, so areas where players can't open chests also stop them using props.

## WorldEdit

WorldEdit and FastAsyncWorldEdit accept custom block ids in patterns:

```text theme={null}
//set lodeitems:ruby_block
//replace stone 5%lodeitems:ruby_ore,95%stone
//set lodeitems:ruby_log[axis=x]
//set lodeitems:marble_stairs[facing=east,half=top]
```

Props are saved in the world as entities, so copying with `//copy -e` and pasting with `//paste -e` brings them along.

## MythicMobs

Use LodeItems items as mob drops:

```yaml theme={null}
drops:
  - lodeitems ruby 1-3
  - lodeitems{item=myserver:ruby} 2
```

## ModelEngine

Draw a prop with an animated ModelEngine model instead of an item model:

```yaml theme={null}
dragon_statue:
  type: prop
  modelengine: dragon_statue    # the blueprint name
  hitbox:
    - 0..1,0..2,0..1
```

The prop still drops its own item when broken. Include ModelEngine's resource pack with [`pack.merge`](https://items.lodemc.net/resource-pack#merging-other-packs).

## PlaceholderAPI

`%placeholders%` work in [action](https://items.lodemc.net/events.md) messages and commands, and in [HUDs](https://items.lodemc.net/huds.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.