> For the complete documentation index, see [llms.txt](https://lethium.gitbook.io/origin-smp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lethium.gitbook.io/origin-smp/stackmaster/config-yml.md).

# config.yml reference

Every top-level section of StackMaster's config.yml in order, with defaults, and the keys you can add that the shipped file does not contain.

`plugins/StackMaster/config.yml` holds every setting. Apply changes with `/sm reload`. The licence key needs a restart.

The file is split by system: `stacking-entities` for mobs, `stacking-items` for dropped items, `stacking-spawners` for spawners. The sections around them are shared.

| Section             | What it holds                        | Details                                                     |
| ------------------- | ------------------------------------ | ----------------------------------------------------------- |
| `config-version`    | File version, `3`. Do not change it. |                                                             |
| `license`           | Your licence key                     | below                                                       |
| `general`           | Master switches and global limits    | below                                                       |
| `storage`           | Where spawner stacks are saved       | [Storage](/origin-smp/stackmaster/storage-and-sync.md)      |
| `performance`       | How merge candidates are found       | below                                                       |
| `stacking-entities` | Mob stacking                         | [Mob stacking](/origin-smp/stackmaster/entity-stacking.md)  |
| `stacking-items`    | Item stacking                        | [Item stacking](/origin-smp/stackmaster/item-stacking.md)   |
| `stacking-spawners` | Spawner stacking, menu, upgrades     | [Spawners](/origin-smp/stackmaster/spawners.md)             |
| `folia`             | Folia and Canvas safety              | below                                                       |
| `debug`             | Console logging                      | below                                                       |
| `commands`          | Per-subcommand switch and permission | [Commands](/origin-smp/stackmaster/commands-permissions.md) |
| `messages`          | Chat and action bar texts            | below                                                       |
| `worlds`            | Per-world overrides                  | below                                                       |

## `license`

```yaml
license:
  key: "YOUR-KEY-HERE"
```

Your StackMaster licence key. The plugin will not run without a valid key. Keep it private, and remove it before you post your `config.yml` anywhere. The shipped `config.yml` has no `license` section: add it at the top. See [Licensing](/origin-smp/getting-started/licensing.md).

## `general`

```yaml
general:
  enabled: true
  disabled-worlds: []
  merge-interval-ticks: 10
  max-merge-operations-per-cycle: 2000
  global-max-stack-size: 10000
  region-safe-mode: true
  cache:
    enabled: true
    expire-after-seconds: 300
```

| Key                                           | Default       | What it does                                                                                                                                           |
| --------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `enabled`                                     | `true`        | Turns **mob and item** stacking off when `false`. Spawner stacking keeps working: switch it with `stacking-spawners.enabled`.                          |
| `disabled-worlds`                             | `[]`          | Worlds where StackMaster stacks nothing: no mobs, items or spawners, whatever the other settings say. Not in the shipped file; add it under `general`. |
| `merge-interval-ticks`                        | `10`          | How often mobs try to merge, in ticks (20 = 1 second). Range 1 to 200.                                                                                 |
| `max-merge-operations-per-cycle`              | `2000`        | Most mobs (and, separately, items) checked in one merge pass. The rest wait for the next pass.                                                         |
| `global-max-stack-size`                       | `10000`       | Ceiling for every stack in every system. A higher `max-stack-size` anywhere is cut down to this.                                                       |
| `region-safe-mode`                            | `true`        | In the file, no effect. The plugin is always region-safe.                                                                                              |
| `cache.enabled`, `cache.expire-after-seconds` | `true`, `300` | In the file, no effect.                                                                                                                                |

A world in `disabled-worlds` matches by its name (`origin_dungeons`), its key (`minecraft:origin_dungeons`) or the part of the key after the colon, ignoring case. Run `/sm reload` after changing it.

{% hint style="info" %}
**Origin SMP:** `disabled-worlds: [origin_dungeons]`, and the same world is also switched off under `worlds.origin_dungeons` for all three systems.
{% endhint %}

## `storage`

`type` (`sqlite`), auto-save, SQLite and MySQL settings. See [Storage](/origin-smp/stackmaster/storage-and-sync.md).

## `performance`

```yaml
performance:
  spatial-indexing: true
  spatial-grid-size: 16
  max-candidates-per-entity: 64
  stop-searching-at-max-stack: true
  ignore-unloaded-chunks: true
  skip-empty-worlds: true
  cache-entity-types: true
  cache-compatibility-results: true
```

| Key                                                                                                                                         | Default | What it does                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- |
| `max-candidates-per-entity`                                                                                                                 | `64`    | Most nearby mobs or items looked at for one stack in one pass. Also used when a placed spawner looks for a stack to join. |
| `stop-searching-at-max-stack`                                                                                                               | `true`  | A full mob stack stops looking for more.                                                                                  |
| `spatial-indexing`, `spatial-grid-size`, `ignore-unloaded-chunks`, `skip-empty-worlds`, `cache-entity-types`, `cache-compatibility-results` |         | In the file, no effect. Nearby lookups always use a chunk grid.                                                           |

## `stacking-entities`, `stacking-items`, `stacking-spawners`

See [Mob stacking](/origin-smp/stackmaster/entity-stacking.md), [Item stacking](/origin-smp/stackmaster/item-stacking.md), [Spawners](/origin-smp/stackmaster/spawners.md) and [Display](/origin-smp/stackmaster/display.md).

One `stacking-entities` key is not in the shipped file:

```yaml
stacking-entities:
  grow-baby-zombies: true
```

See [Baby zombies](/origin-smp/stackmaster/entity-stacking.md#baby-zombies).

## `folia`

```yaml
folia:
  region-safe-scheduling: true
  entity-region-execution: true
  chunk-region-execution: true
  prevent-cross-region-entity-access: true
  queue-unsafe-operations: true
  max-queued-operations-per-region: 500
  debug-thread-safety: false
```

These switches are in the file but have no effect. StackMaster always runs entity work on the entity's region thread and block work on the block's region thread, on Paper, Folia and Canvas alike. See [Compatibility](/origin-smp/stackmaster/compatibility.md).

## `debug`

```yaml
debug:
  enabled: false
  log-merges: false
  log-splits: false
  log-spawner-loads: false
  log-spawner-saves: false
  log-item-merges: false
  log-region-operations: false
  log-compatibility-failures: false
```

| Key                                                                   | Default | What it logs                                                                                                                                      |
| --------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `log-merges`                                                          | `false` | Every mob merge and every spawner added to a stack.                                                                                               |
| `log-item-merges`                                                     | `false` | Every item merge.                                                                                                                                 |
| `log-spawner-loads`                                                   | `false` | Every spawner stack restored from storage.                                                                                                        |
| `log-compatibility-failures`                                          | `false` | **Why** two mobs or items did not merge (`variant`, `age`, `named_identity`, `data_components` ...). The best tool when something does not stack. |
| `enabled`, `log-splits`, `log-spawner-saves`, `log-region-operations` | `false` | In the file, no effect.                                                                                                                           |

Each `log-*` switch works on its own. Turn them off again on a live server: they are very chatty.

## `commands`

One block per subcommand with `enabled` and `permission`. See [Commands and permissions](/origin-smp/stackmaster/commands-permissions.md#changing-a-commands-permission-or-turning-it-off).

```yaml
commands:
  debug:
    enabled: false
    permission: "stackmaster.command.debug"
```

`debug` is off by default. The shipped file has no `give` block; `/sm give` is on with `stackmaster.command.give` anyway.

## `messages`

Chat and action bar texts. `&` codes and `&#RRGGBB` work. `{prefix}` inserts `messages.prefix`.

| Key                                                                             | Used for                                              | Placeholders                     |
| ------------------------------------------------------------------------------- | ----------------------------------------------------- | -------------------------------- |
| `prefix`                                                                        | Start of most messages. Default `&8[&bStackMaster&8]` |                                  |
| `no-permission`                                                                 | No permission, unknown or disabled subcommand         |                                  |
| `reloaded`                                                                      | After `/sm reload`                                    |                                  |
| `incompatible`                                                                  | Nothing to split, inspect or remove                   |                                  |
| `stack-split`                                                                   | After a split                                         | `{amount}`                       |
| `stack-info`                                                                    | `/sm inspect` on a non-spawner stack                  | `{entity}` `{size}` `{world}`    |
| `spawner-not-found`                                                             | Spawner command without looking at a spawner          |                                  |
| `spawner-protected`                                                             | Someone else's spawner                                |                                  |
| `spawner-added`                                                                 | Action bar: spawners added                            | `{amount}` `{entity}` `{size}`   |
| `spawner-removed`                                                               | Action bar: one spawner taken off                     | `{amount}` `{entity}` `{size}`   |
| `spawner-full`                                                                  | Action bar: stack full                                | `{size}`                         |
| `spawner-egg-blocked`                                                           | Action bar: spawn egg on a stack                      | `{size}`                         |
| `spawner-silk-touch`                                                            | Break without Silk Touch                              |                                  |
| `spawners-merged`                                                               | After `/sm stack`                                     | `{amount}`                       |
| `stack-removed`                                                                 | After `/sm remove` on a spawner                       | `{size}`                         |
| `delay-prompt`                                                                  | Asking for a typed delay                              | `{which}` `{lowest}` `{highest}` |
| `delay-invalid`                                                                 | Typed delay not understood                            | `{input}`                        |
| `upgrade-module-disabled`, `upgrade-unknown`, `upgrade-disabled`, `upgrade-max` | Upgrade refused                                       |                                  |
| `upgrade-no-economy`                                                            | Upgrade costs money but no Vault economy              |                                  |
| `upgrade-no-money`                                                              | Not enough money                                      | `{cost}`                         |
| `upgrade-bought`                                                                | Upgrade bought                                        | `{name}` `{level}` `{cost}`      |
| `upgrade-set`                                                                   | Level set by staff, or lowered                        | `{name}` `{level}`               |

`stack-created`, `stack-merged` and `stack-limit` are in the file but never sent.

### Messages to add

The plugin also sends the messages below, but the shipped `config.yml` does not contain them. Without them the player sees the bare key (for example `give-done`). Add them under `messages:`:

```yaml
  give-usage: "{prefix}&7Usage: &f/{label} give <player> <mob> spawner [amount]"
  give-offline: "{prefix}&cPlayer '{player}' is not online."
  give-unknown: "{prefix}&c'{input}' is not a mob that can sit in a spawner."
  give-too-many: "{prefix}&cAt most &f{max} &cspawners at once ({per} per item, 64 items)."
  give-done: "{prefix}&7Gave &f{player} &7one &e{entity} Spawner &8x&f{size}&7."
  give-done-multi: "{prefix}&7Gave &f{player} &f{items} &e{entity} Spawner &7items (&f{size} &7spawners, &f{per} &7per item at most)."
  give-received: "{prefix}&7You received a &e{entity} Spawner &8x&f{size}&7."
  delay-locked: "{prefix}&cOnly staff can change the spawn delay of a spawner."
```

`delay-locked` is shown when a player without `stackmaster.spawner.delay.edit` clicks the delay editor.

## `worlds`

Per-world overrides. Put any key of `stacking-entities`, `stacking-items` or `stacking-spawners` under the world's name, with the same path. Keys you leave out use the main value.

```yaml
worlds:
  world_nether:
    stacking-entities:
      max-stack-size: 50
  world_the_end:
    stacking-entities:
      enabled: false
    stacking-spawners:
      max-stack-size: 16
```

The world name is the folder name (`world`, `world_nether`). For mobs a per-mob-type setting under `stacking-entities.entities` beats the world setting.

{% hint style="info" %}
The shipped file has a `worlds.default` block. It only applies to a world that is really named `default`. It is not a fallback for all worlds.
{% endhint %}
