# The Admin GUI

## The admin GUI

`/tcpws gui` opens an in-game admin console for managing wild presets. You can do everything you'd otherwise do by editing `wild-presets.yml` directly, without leaving the game.

This guide walks through every screen.

### Opening the GUI

```
/tcpws gui
```

Requires `tcpws.admin` (default: OP). The plugin re-checks the permission on every click — if a player has it stripped while the GUI is open, the next click closes the menu.

### The preset list

The first screen is a paginated list of every preset in `wild-presets.yml`.

```
┌─────────────────────────────────────────┐
│  [goblin_camp]  [dragon_lair]  ...      │
│  ...                                    │
│  [← Prev]   [+ Add]   [Next →][X]       │
└─────────────────────────────────────────┘
```

* **Click a preset tile** → enter that preset's editor.
* **Shift + Right-click a preset tile** → 2-step delete confirm.
* **Click `+ Add`** → chat-input prompt for a new preset id; on success a blank preset is created and you're dropped into its editor.
* **`← Prev` / `Next →`** → navigate pages.
* **`X`** → close.

Preset tiles show: id, current display name, provider, mob counts (normal / ominous), and any flags (DISABLED, EMPTY).

### The preset editor

Click a preset from the list:

A 3-row chest with toggles, mob-list shortcuts, and buttons. The exact slot layout differs slightly across patch versions but the contents are:

* **Display name** — Click to rename via chat-input (MiniMessage).
* **Provider** — Read-only; shows the configured provider. Edit via `wild-presets.yml` (changing provider mid-life is uncommon).
* **Enabled toggle** — Click to flip. When off, `/tcpws give` rejects the preset.
* **Allow-empty toggle** — Click to flip. Required `true` if both mob lists are empty.
* **Cycle-cage-mobs toggle** — Click to flip. Recommended `true` for vanilla provider.
* **Griefing-protection toggle** — Click to flip. When on, only the original placer can mine the spawner.
* **Edit normal mobs** → opens the mob list editor.
* **Edit ominous mobs** → opens the same editor for the ominous list.
* **← Back** — return to the preset list.
* **X** — close.

#### Auto-save

Every change commits to disk after a 250ms quiet period. Toggling a flag 5 times in a second produces one save, not five. Closing the editor flushes any pending save immediately.

### The mob list editor

Click "Edit normal mobs" or "Edit ominous mobs" from the preset editor:

A paginated 6-row chest showing every mob currently in the list. Each tile shows the mob id with a "Right-click to remove" hint.

#### Adding a mob

The behaviour depends on the preset's provider:

**Vanilla provider — spawn-egg picker**

Click the "+ Add Mob" button. A new GUI opens — a paginated grid of every vanilla spawn-egg you can use as a trial-spawner mob. Click any egg to add the corresponding mob to the list. No typing required.

The picker filters out non-living entities and bosses (Ender Dragon, Wither, Warden) that vanilla refuses to spawn via trial spawners.

**Non-vanilla provider — chat-input fallback**

For MythicMobs, EliteMobs, EcoMobs, etc., clicking "+ Add Mob" closes the GUI and prompts you in chat:

```
Type the mob id (or 'cancel'):
```

Type the bare mob id as it appears in your provider's config (no `mythic:` or other prefix). Press Enter; the GUI re-opens with the new mob in the list.

The plugin can't enumerate non-vanilla providers' registries without taking hard dependencies on each. Chat-input is the universal fallback — works against any provider you have set up.

#### Removing a mob

Right-click any mob tile to remove it. Auto-save fires immediately.

#### Page hint after add

After adding a mob via either path, you'll see a chat hint:

```
Added <mob> to page 2 of 3.
```

A config option (`gui.add-mob-jump-to-new-page`, default `false`) controls whether the GUI auto-navigates to the new mob's page or stays on the current view.

### The delete confirm

From the preset list, **shift + right-click** a preset tile:

A 1-row chest with two buttons:

* **Confirm delete (red concrete)** — first click arms the second confirmation; second click within 5 seconds commits.
* **Cancel (green concrete)** — return to the preset list.

If you let 5 seconds pass without a second click, the button reverts. Closing the GUI also reverts.

When you commit:

* The preset is removed from `wild-presets.yml`.
* Any **spawner items** already issued under this preset id are orphaned — when placed, they'll log a one-time warning and fall back to a placeholder zombie. They don't crash anything, but they no longer have valid mob lists.
* Any **placed spawners** of this preset will log a similar warning on next activation and either fall back or refuse to spawn, depending on `allow-empty`.

The orphaning is permanent — there's no automatic cleanup of already-distributed spawner items. Best practice: don't delete presets you've actively distributed; toggle `enabled: false` instead.

### Keyboard tips

* The GUI doesn't intercept keyboard events — `/back`, `/spawn`, and other server commands work normally.
* Shift-clicking moves no items into our GUI — every shift-click is cancelled. This protects against duplication exploits.

***

Next: **Commands & permissions →** · **Mining and re-deploying →**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://darkstarworks.gitbook.io/plugins/mc/tcp-documentation/tcp-wildspawners/the-admin-gui.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
