# Commands

# Commands Reference

All commands use the `/ksitem` prefix. Aliases: `itemcontrol`, `ic`.

**Admin** in the tables below means `ks.item.admin` **and** `kyuubisoft.itemcontrol.admin`. Staff need both nodes; see [Permissions](https://wiki.kyuubisoft.com/hytale/item-control/permissions/#admin-nodes).

:::note[Commands need the module at server start]
The subcommands of a module only exist if the module was on when the server started. If you turn a module on while the server runs, its window works right away, but its `/ksitem` command only comes after the next restart. Turning a module off while the server runs leaves its command there, and it answers that the module is not enabled.
:::

Almost everything here is also in the [Admin Hub](https://wiki.kyuubisoft.com/hytale/item-control/admin-ui/). Some things are only there: cooldown categories and groups, temporary rules that start later or announce themselves, and clearing a single slot.

## General

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem admin` | Open the Admin Hub | Admin |
| `/ksitem reload` | Reload `config.json`, languages and the item list | Admin |

`/ksitem reload` does not start or stop modules, and it does not read the data files of the other modules again. See [Configuration](https://wiki.kyuubisoft.com/hytale/item-control/configuration/#data-files-of-the-other-modules).

With KyuubiSoft Core installed, the Admin Hub can also be opened from the Item Control tile in the `/ksadmin` hub. That needs the same rights as `/ksitem admin`, and `ks.admin` for Core's hub.

## Item Browser

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem browse` | Open the Item Browser (search, filter, recipes, drops) | `ks.item.user.browse` (everyone by default) |
| `/ksitem compare <item1> <item2>` | Compare two items side by side; a green value on the right is higher than on the left, a red one is lower | `ks.item.user.compare` (everyone by default) |

:::tip[Item Details]
To view detailed properties of a specific item, open the browser with `/ksitem browse` and click any item in the grid. There is no standalone info command -- the detail view is part of the browser with tabs for Info, Recipes, and Drops.
:::

## Module Management

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem module list` | Show all modules, marked **[ON]** / **[OFF]** | Admin |
| `/ksitem module enable <id>` | Enable a module | Admin |
| `/ksitem module disable <id>` | Disable a module | Admin |

## Give

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem give <itemId> [--amount=<n>]` | Give an item to yourself, one by default | `ks.item.give` + `kyuubisoft.itemcontrol.give` |

The amount is a named argument: `/ksitem give Weapon_Sword_Iron --amount=5`.

## Crafting Rules

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem craft list` | Show blocked items | Admin |
| `/ksitem craft add <itemId>` | Block an item (or a [pattern](https://wiki.kyuubisoft.com/hytale/item-control/modules/#item-patterns)) from being crafted | Admin |
| `/ksitem craft remove <itemId>` | Unblock an item | Admin |

## Death Rules

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem death list` | Show protected items and current mode | Admin |
| `/ksitem death add <itemId>` | Protect an item (or a pattern) on death | Admin |
| `/ksitem death remove <itemId>` | Remove protection | Admin |
| `/ksitem death mode <mode>` | Set default death mode (`vanilla`, `keep-all`, `selective`) | Admin |

## Usage Restrictions

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem restrict list` | Show all restrictions | Admin |
| `/ksitem restrict add <itemId> [permission]` | Restrict equipping an item (`block-equip`). With a permission, only players who have it may equip the item, `owner` means the soulbound owner, and without one nobody may. | Admin |
| `/ksitem restrict remove <itemId>` | Remove restriction | Admin |

Other kinds of block, and a message for the player, are in the **Usage Rules** of the Admin Hub.

## Soulbound

| Command | Description | Permission |
|---------|-------------|------------|
| `/soulbound` | Check soulbound info of the currently held item (standalone command) | `ks.item.user.soulbound` (everyone by default) |
| `/ksitem soulbound bind` | Bind the held item to yourself (stamps metadata on the item) | Admin |
| `/ksitem soulbound unbind` | Remove soulbound from the held item | Admin |
| `/ksitem soulbound check` | Show soulbound details of the held item (owner, UUID, bind time) | Admin |
| `/ksitem soulbound autobind add <itemId>` | Add an item or pattern to the auto-soulbound list (binds on pickup) | Admin |
| `/ksitem soulbound autobind remove <itemId>` | Remove an entry from the auto-soulbound list | Admin |
| `/ksitem soulbound autobind list` | Show all auto-soulbound entries | Admin |
| `/ksitem soulbound recover` | Get back your own lost soulbound items. They become available 5 minutes after they were lost. | Admin |

## Drop Prevention

Needs the `drop-prevention` module.

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem dropprevention protect` | Mark the held item as drop protected | Admin |
| `/ksitem dropprevention unprotect` | Remove drop protection from the held item | Admin |
| `/ksitem dropprevention check` | Show whether the held item is protected (by its own mark or by the auto list) | Admin |
| `/ksitem dropprevention autoprotect add <itemId>` | Add an item or pattern to the auto-protect list (marked on pickup) | Admin |
| `/ksitem dropprevention autoprotect remove <itemId>` | Remove an entry from the auto-protect list | Admin |
| `/ksitem dropprevention autoprotect list` | Show the auto-protect list | Admin |

## Cooldowns

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem cooldown set <itemId> <seconds>` | Set a cooldown on an exact item ID | Admin |
| `/ksitem cooldown remove <itemId>` | Remove a cooldown | Admin |
| `/ksitem cooldown list` | List all item cooldowns | Admin |
| `/ksitem cooldown check <itemId>` | Check your own remaining cooldown | `ks.item.admin` |

## Watched Items

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem watch list` | Show watched items | Admin |
| `/ksitem watch add <itemId>` | Watch an exact item ID | Admin |
| `/ksitem watch remove <itemId>` | Stop watching an item | Admin |
| `/ksitem watch alerts` | Show the last 20 alerts | Admin |

## Inventory Tools

**Inv** in this table means `ks.item.admin` **and** `kyuubisoft.itemcontrol.inventory`.

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem inv view [player]` | View the inventory of an online player, or your own | Inv |
| `/ksitem inv history [player]` | View the backup history of an online player, or your own | Inv |
| `/ksitem inv snapshot <name>` | Save a named backup of your own inventory | Inv |
| `/ksitem inv restore` | Restore your own latest backup | Inv |
| `/ksitem inv clear [player]` | Clear the inventory of an online player, or your own | Inv + `ks.item.admin.clearslot` |
| `/ksitem inv wipe <itemId>` | Remove an item from everyone online | Inv + `ks.item.admin.removeall` |

- **Safety backups:** `clear`, `restore` and `wipe` store a [safety backup](https://wiki.kyuubisoft.com/hytale/item-control/admin-ui/#safety-backups) first, and change nothing if that fails. In `wipe`, a player whose backup fails keeps the item.
- **`restore`** takes the latest real backup and skips the safety backups of earlier actions.
- **Offline players:** Their history is only in the **Inventory** place of the Admin Hub.

## Drop Rules

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem drops add <npcRole> <itemId> <min> <max> <chance> [mode]` | Add a drop rule | Admin |
| `/ksitem drops remove <npcRole> <itemId>` | Remove a drop rule | Admin |
| `/ksitem drops list [npcRole]` | Show drop rules | Admin |
| `/ksitem drops listroles` | Show configured NPC roles | Admin |
| `/ksitem drops reload` | Reload drop rules from file | Admin |

`<chance>` is a fraction from 0 to 1, so `0.5` means 50 %. The window of the Admin Hub takes percent instead. `[mode]` is `add` (the default), `replace` or `remove`.

## Temporary Rules

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem temprule list` | Show all temporary rules | Admin |
| `/ksitem temprule add <id> <type> <itemId> <minutes>` | Create a rule for one exact item ID that starts now | Admin |
| `/ksitem temprule remove <id>` | Delete a rule | Admin |
| `/ksitem temprule info <id>` | Show rule details | Admin |

**Temp Rule Types:** `crafting-block`, `crafting-unlock`, `usage-block`

## Item Overrides

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem override set <itemId> <field> <value>` | Override a field | Admin |
| `/ksitem override get <itemId> [field]` | View overrides | Admin |
| `/ksitem override reset <itemId> [field]` | Reset override(s) | Admin |
| `/ksitem override list` | Show all overridden items | Admin |

**Override Fields:**

The following fields can be used with `/ksitem override set`:

| Field | Description |
|-------|-------------|
| `maxDurability` | Maximum durability |
| `durabilityLossOnHit` | Durability lost per hit |
| `maxStack` | Maximum stack size |
| `qualityId` | Item quality/rarity |
| `consumable` | Whether item is consumable (`true` or `false`) |
| `dropOnDeath` | Whether item drops on death (`true` or `false`) |
| `durabilityLossOnDeath` | Whether item loses durability on death (`true` or `false`) |
| `toolSpeed` | Tool mining speed |
| `armorResistance` | Armor resistance value |
| `craftingTier` | Required crafting tier |
| `craftingOutputQty` | Crafting output quantity |
| `weaponDamage` | Weapon damage (proportional scaling across all types) |
| `weaponDamage.<Type>` | Per-damage-type override (e.g. `weaponDamage.Physical`) |
| `signatureMove` | Swap signature ability to another weapon's signature |
| `weaponStat.<StatName>` | Weapon stat modifier (e.g. `weaponStat.SignatureEnergy`) |
| `interaction.<idx>.<field>` | Per-interaction override |
| `armor.baseDamageResistance` | Base armor resistance |
| `armor.resistance.<type>` | Per-type armor resistance |
| `armor.enhancement.<type>` | Per-type armor enhancement |
| `armor.kbResistance.<type>` | Per-type knockback resistance |
| `armor.kbEnhancement.<type>` | Per-type knockback enhancement |
| `armor.stat.<stat>` | Armor stat modifier |
| `armor.classEnh.<class>` | Attack class enhancement (LIGHT, CHARGED, SIGNATURE) |

## Command Blocks

| Command | Description | Permission |
|---------|-------------|------------|
| `/ksitem cmdblock` | Toggle command block edit mode (alias `/ksitem cb`) | Admin |
| `/ksitem browsescripts` | Script file browser (needs KyuubiSoft Core). Currently unavailable: Core's file browser is switched off and only answers with a chat message, so type script paths into the command block editor directly | Admin |

In edit mode, hit any block to open the Command Block Editor. Blocks that run as the server console also need `ks.core.admin.dialog.console`; see [Permissions](https://wiki.kyuubisoft.com/hytale/item-control/permissions/#command-blocks).

## Language

| Command | Description | Permission |
|---------|-------------|------------|
| `/kslang` | Show your current language and the available languages in chat | Everyone |
| `/kslang <code>` | Choose a language, e.g. `de-DE` | Everyone |
| `/kslang auto` | Follow your game language again | Everyone |