# Commands & Permissions

Canonical: https://splugins.net/docs/executablegems/commands-and-permissions

# ⌨️ Commands & Permissions

The main command is `/eg`. `/executablegems` and `/gems` are aliases. Every command can be run from the console, except those marked *in game only*.

On this page, `` is required and `[value]` is optional.

## Permissions

| Permission | Default | What it does |
|---|---|---|
| `executablegems.admin` | OP | Every `/eg` command, except `/eg codex` for yourself and `/eg cinematic`, which are open to everyone |
| `executablegems.forge.remove` | OP | Pick up a forge with sneak + left click |
| `executablegems.forge.bypass` | OP | Work on an item another player laid on a forge |
| `ei.item.*` | OP | **From ExecutableItems. Every player needs it for the gems to work.** |

> **DANGER**
**Give your players the permission `ei.item.*`**

A gem runs through ExecutableItems, which checks the permission of the item. A player who is not OP needs **`ei.item.*`**, or every gem shows "You do not have the permission to use eg_..." and does nothing.

With LuckPerms: `/lp group default permission set ei.item.* true`

Without a permission plugin, put this in the `permissions.yml` of your server and restart:

```yaml
ei.item.*:
  default: true
```

Players need no other permission to socket gems, use a forge, buy from the jeweller or read the Codex.

## Give items

| Command | What it does |
|---|---|
| `/eg give   [level] [amount]` | Gives a gem. Level and amount default to 1. |
| `/eg tool   [amount]` | Gives `socket_drill`, `gem_extractor`, `gem_forge`, `rough_gem` (Unidentified Gem) or `gem_codex`. |

## Change the item a player holds

These commands act on the item in the player's **main hand**.

| Command | What it does |
|---|---|
| `/eg apply   [level]` | Sockets a gem. It cannot fail, and drills a socket if there is no free one. The sockets limit still applies to the drill. |
| `/eg remove  [gem]` | Removes one gem, or all gems if none is named. |
| `/eg level   <n\|+n\|-n>` | Sets or changes the level of a socketed gem. |
| `/eg xp   ` | Sets the XP of a socketed gem. |
| `/eg sockets  ` | Sets the number of sockets. Going lower deletes the last sockets and their gems. |

## Forges

| Command | What it does |
|---|---|
| `/eg forge` | Places a forge at your feet. *In game only.* |
| `/eg forge remove` | Removes the nearest forge within 6 blocks. *In game only.* |

Players can also place a forge with the **Gem Forge** item. See [The Gem Forge](/docs/executablegems/player-guide/the-gem-forge).

## Content

| Command | What it does |
|---|---|
| `/eg new   [cut] [#colour]` | Writes `gems//.yml` from a fully commented template, then reloads. See [Create your first gem](/docs/executablegems/questions-or-guides/tutorials/your-first-gem). |
| `/eg list` | Lists every category, gem and runeword, with the weights. |
| `/eg reload` | Reloads the config, the gems, the runewords and the forges. New native enchantments need a restart. |
| `/eg discoveries reset [runeword]` | Hides the runewords again in the Codex (one, or all). |

## For players

| Command | What it does |
|---|---|
| `/eg codex` | Opens the Codex. |
| `/eg codex  [category\|gem] [page]` | Opens the Codex for a player, on a category or a gem. Needs `executablegems.admin`, except for yourself. |
| `/eg cinematic [on\|off]` | Toggles the camera that turns around the weapon during an awakening. |

## For testing

| Command | What it does |
|---|---|
| `/eg dummy` | Spawns a training dummy in front of you. It never dies and shows every hit as a floating number. *In game only with no arguments.* |
| `/eg dummy    [yaw]` | Spawns one at a position (console). |
| `/eg luck  [on\|off]` | Every chance roll of this player succeeds. Very useful to test a gem. |
| `/eg forcefail ` | The next socketing of this player fails. |

Previews that change nothing on the player's items:

| Command | Shows |
|---|---|
| `/eg fx confirm   [level]` | The socketing confirmation for the held item |
| `/eg fx totem   [level]` | The full-screen reveal of a gem |
| `/eg fx post  <socket\|shatter\|awaken> [gem or runeword]` | A full-screen effect (26.3+) |
| `/eg fx awaken  ` | The world event of an awakening |
| `/eg fx toast   ` | The tier-up toast |
| `/eg fx loot  <gem\|rough> [level] [distance]` | A dropped gem with its beam of light |
| `/eg fx inspect ` | The inspect view of the held item |
| `/eg fx shop ` | The shop of the nearest forge |
| `/eg fx appraise  [spin]` | The appraisal of the nearest forge |
| `/eg fx upgrade  [do]` | The upgrade menu of the nearest forge (`do` upgrades it, and the player pays) |
| `/eg fx say   [cheer\|dismay\|awe]` | A line of the jeweller of the nearest forge |

## For your activators

Use these inside the commands of a gem or a runeword. See [Activators in gems](/docs/executablegems/configurations/activators-in-gems).

| Command | What it does |
|---|---|
| `eg fx beam   <#hex> [streams]` | A beam between two entities |
| `eg fx ring   <#hex>` | A ring on the ground |
| `eg fx burst  <#hex> [count]` | A burst of particles |
| `eg fx spiral  <#hex> [ticks]` | A spiral around the entity |
| `eg fx shockwave   <#hex>` | An expanding shockwave |
| `eg sweep   [offhand]` | The vanilla cooldown animation on the held item |
| `eg drop <tool\|gem:id:level>    ` | Drops an item with its beam at a block |
| `eg rain    [shooter]` | A rain of arrows that nobody can pick up |
| `eg star   ` | A falling star on the nearest enemy |

An `` is a player name or a UUID, such as `%player%` or `%entity_uuid%`.