# Commands

# Commands

## Main commands

### `/ksinfo`

Opens the Info Hub book on the Start tab.

| Property | Value |
|----------|-------|
| **Default Aliases** | `/hub`, `/hilfe`, `/menu` |
| **Permission** | `ks.info.user.use` (granted by default) |
| **Players Only** | Yes |

The command name and aliases are set in `config.json` under `command.name` and `command.aliases`. `help` is never registered, also not from older configs: the game's own `/help` always wins.

---

### `/ksinfoitem`

Gives you the Info Book item (right-click it to open the Info Hub).

| Property | Value |
|----------|-------|
| **Default Aliases** | `/getinfo`, `/infobuch` |
| **Permission** | `ks.info.user.use` |
| **Players Only** | Yes |

The reply says what happened: given, you already have it, inventory full, or the item is disabled in the config.

---

### `/ksinfoadmin`

Admin commands. They are only listed for admins and the console.

| Subcommand | What it does | Who |
|------------|--------------|-----|
| `panel` | Opens the [admin window](./admin-panel) | `ks.info.admin` (or the old `infohub.admin`); player only. On a showcase server visitors may browse read-only |
| `reload` | Reloads all files, translations and the command cache. Waits for a running save | Console, `ks.info.admin`, `infohub.admin`, or the node set in `permissions.adminReload` |
| `browsebanners` | Lists the banner images in `banner/` in chat, with size and the active one | `ks.info.admin` (or `infohub.admin`), or the console |

If some files could not be read, `reload` names them in chat.

---

## Section commands

Section shortcuts are registered from the `sections` part of `config.json`. Each section with a `command` gets its own command.

| Command | Section |
|---------|---------|
| `/commands` | Commands |
| `/rules` | Rules |
| `/faq` | FAQ |
| `/team` | Team |

`news` and `serverinfo` have no command by default. To add one:

```json
"serverinfo": {
  "icon": "Ore_Prisma",
  "priority": 4,
  "enabled": true,
  "command": "serverinfo",
  "commandAliases": ["server"]
}
```

A section command checks `ks.info.user.use`, the section's `enabled` flag and its `permission` every time it is used.

---

## Custom page commands

A custom page in `custom/pages.json` with a `command` gets its own command:

```json
{
  "id": "changelog",
  "title": "Server Changelog",
  "command": "changelog",
  "commandAliases": ["updates", "patchnotes"]
}
```

This registers `/changelog`, `/updates` and `/patchnotes`. The page's `permission` is checked when the command is used, so the command shows up in autocomplete for everyone, but players without the permission get "no permission".

---

## When changes apply

- The book always uses the current content and permissions after a reload or a save in the admin window.
- A **new or renamed command name** needs a server restart (commands are registered once at start). The admin window shows a "restart needed" hint.

---

## Permissions summary

| Permission | Used by |
|------------|---------|
| `ks.info.user.use` | `/ksinfo`, section and page commands, `/ksinfoitem`, the Info Book item, the `showcase_infobook` NPC |
| `ks.info.admin` (or `infohub.admin`) | `/ksinfoadmin` and the admin window |
| `ks.core.admin.dialog.console` | Adding, changing or removing quick tiles that run as the console |
| `infohub.bypass.commandfilter` (configurable) | Run commands that the command filter blocks |
| Section / category / page `permission` | Per-section, per-category and per-page access |

See [Permissions](./permissions) for details.