# Commands

**Version:** 1.0.0

Players use `/ksevent` (alias `/events`): `/events join 2` is the same as `/ksevent join 2`. Admins use `/kseventadmin`. Every `/ksevent` command needs a player; `/kseventadmin` also works from the server console.

`/ksevent help` and `/kseventadmin help` list the commands in chat, in your language.

## Overview

| Command | What it does | Permission |
|---------|--------------|------------|
| `/ksevent` | Opens the events window | `ks.events.user.open` |
| `/ksevent list` | Lists the coming dates with numbers | `ks.events.user.open` |
| `/ksevent join [date]` | Signs you up | `ks.events.user.join` |
| `/ksevent leave [date]` | Takes your sign-up back | `ks.events.user.join` |
| `/ksevent remind [all\|joined\|off\|date]` | Sets which dates remind you, or marks one date | `ks.events.user.open` |
| `/ksevent travel [date]` | Travels to an event | `ks.events.user.travel` |
| `/ksevent back` | Travels back to where you were | `ks.events.user.travel` |
| `/ksevent vote` | Opens the rating bar of a build contest | `ks.events.user.vote` |
| `/ksevent help` | Lists the player commands | `ks.events.user.open` |
| `/kseventadmin` | Opens the admin window | `ks.events.admin` |
| `/kseventadmin start [event]` | Starts the next date of an event now | `ks.events.admin` |
| `/kseventadmin next [target]` | Moves an event to its next phase | `ks.events.admin` |
| `/kseventadmin extend [minutes] [target]` | Gives the running phase more time | `ks.events.admin` |
| `/kseventadmin end [target]` | Ends the running event now | `ks.events.admin` |
| `/kseventadmin cancel [target] [message]` | Cancels an event and tells everyone signed up | `ks.events.admin` |
| `/kseventadmin reload` | Reloads `config.json` and the language files | `ks.events.admin` |
| `/kseventadmin field snapshot <field>` | Saves the empty state of a build field | `ks.events.admin` |
| `/kseventadmin field retry <field>` | Switches a failed field reset back on | `ks.events.admin` |
| `/kseventadmin field selftest` | Tests the field reset on a small test area | `ks.events.admin` |
| `/kseventadmin help` | Lists the admin commands | `ks.events.admin` |
| `/kslang [code]` | Chooses your language for all KyuubiSoft mods | none |

The `ks.events.user.*` nodes are allowed unless you set them to `false`. Players without one get "You are not allowed to do that." See [Permissions](./permissions).

---

## Player commands

### Which date a command means

`join`, `leave`, `remind` and `travel` take a **date**, written as one of:

- the **number** from `/ksevent list` (`/ksevent join 2`),
- the **event id**, which is made from the name in lower case with dashes (`/ksevent join boss-night-at-the-volcano`),
- the **name** of the event, exact or its beginning, upper and lower case do not matter (`/ksevent join Boss night`).

The list is computed fresh for every command, so the numbers match what you just saw. An unknown word answers: `No event "<word>" in the list. See /ksevent list.`

### `/ksevent`

Opens the events window on **Calendar**. See [UI Pages](./ui-pages).

### `/ksevent list`

Shows the dates of the next 14 days, at most 10, in server time:

```
Coming events (server time)
1. Fri 11/13 · 19:00 – Boss night at the volcano · in 2 days 23 h · joined
2. Sat 11/14 · 20:00 – Build contest · in 4 days
3. Sun 11/15 · 18:00 – Server birthday raffle · in 4 days 22 h · reminder on
/ksevent join <no.> · /ksevent remind <no.> · /ksevent travel <no.>
```

A date that runs right now says `running now`. Without dates: "No events planned for the next two weeks."

### `/ksevent join [date]`

Signs you up for a date. Without a date it takes the first coming date you have not joined yet.

- **Build contest:** until the start, as long as the field has free plots. After the start you can still join for 10 minutes (`contest.lateSignupMinutes`) while plots are free; you get a plot at once. Answer: "You are in: Build contest. You get your plot at the start."
- **Meeting point:** until the end. Answer: "You are in: Boss night at the volcano. You will be reminded before the start."
- Refusals: "All plots are taken.", "Signup is closed.", "You are already in.", "This event is paused."

### `/ksevent leave [date]`

Takes your sign-up back. Without a date it takes the first date you joined. Answer: "You withdrew from Build contest."

In a contest you cannot leave during the voting and the ceremony. Leaving during the build time frees your plot; what you built stays.

### `/ksevent remind [all|joined|off|date]`

| Form | What it does |
|------|--------------|
| `/ksevent remind` | Shows your current setting |
| `/ksevent remind all` | Every date reminds you |
| `/ksevent remind joined` | Only dates you joined remind you (default) |
| `/ksevent remind off` | No automatic reminders |
| `/ksevent remind <date>` | Switches "Remind me" for one date on or off |

Also accepted: `alle`, `angemeldet`, `angemeldete`, `aus` and `none`. A date marked with "Remind me" reminds you in every mode, also with `off`. The same choice is in the window and, with KyuubiSoft Core, in `/kssettings`.

### `/ksevent travel [date]`

Travels to an event. It works from 10 minutes before the start (`travel.opensMinutesBefore`) until the end. Without a date it takes the open date you joined, else the first open one; if none is open: "Travel opens 10 min before the start."

- Stand still for 3 seconds: "Travelling in 3 s … please do not move." Moving more than 1 block or taking damage cancels the trip.
- **Build contest:** you land on your own plot, else at the event's place or in the middle of the field. While the field is being reset before a contest, you land just outside the field instead.
- **Meeting point:** you land at the meeting point or the warp.
- The first trip to a date saves where you came from, for `back`.
- Not from a dungeon or minigame: "You cannot travel from a dungeon or minigame."

### `/ksevent back`

Takes you back to where you were before your first trip to the event, until 30 minutes after its end (`travel.returnWindowMinutes`). Same warm-up as `travel`. Not from a dungeon or minigame.

### `/ksevent vote`

Opens the rating bar of the build contest that is in its voting phase. See [UI Pages](./ui-pages#rating-bar). If there is nothing to rate: "Right now there is nothing you can rate."

### `/ksevent help`

Lists the player commands. The `vote` line only shows when you have `ks.events.user.vote`.

---

## Admin commands

Every `/kseventadmin` command needs `ks.events.admin` and also runs from the server console. `/kseventadmin` alone opens the admin window for a player and shows the help on the console.

### Which run a command means

`next`, `extend`, `end` and `cancel` take a **target**: the id of a run (a single date) or the id of an event.

- An **event id** means its running date. For `next` and `cancel` it also means its next planned date when nothing of it runs.
- **Without a target**, the command works on the only running event. If several run: "Several events are running, give one of: ..."; if none: "No event is running. Give a run id or event id."

Event ids are listed by `/kseventadmin start` without an argument.

### `/kseventadmin start [event]`

Starts the next date of an event now, with the full length of its phases. The minimum number of sign-ups does not apply.

```
/kseventadmin start build-contest
```

Answer: "Build contest has started (&lt;run id&gt;)." If the field is still being reset: "Build contest starts as soon as the field reset is done (&lt;run id&gt;)." Without an event it lists all events with id, name and next date.

### `/kseventadmin next [target]`

Moves the event to its next phase: sign-up → build time → voting → ceremony → end for a contest, start → end for a meeting. On a planned date it starts it. Answer: "Build contest: now Voting." and the time left of the new phase.

### `/kseventadmin extend [minutes] [target]`

Gives the running phase more minutes: 5 by default, 1 to 120. Example: `/kseventadmin extend 10 build-contest`. Answer: "+10 min for Build contest."

### `/kseventadmin end [target]`

Ends the running event now. The result and the rewards come from what is there, without ceremony effects. Ending a contest during the build time still gives the rewards for taking part.

### `/kseventadmin cancel [target] [message]`

Cancels the running or the next date. Everyone signed up gets a notice (card, chat line and, with Whisperstone, a note), with your message if you give one (up to 200 characters). No rewards are given.

```
/kseventadmin cancel build-contest Moved to Sunday
```

Answer: "Build contest cancelled, 7 signed up players were told."

### `/kseventadmin reload`

Reads `config.json` and the language files again. Answer: "Config and texts reloaded."

### `/kseventadmin field snapshot <field>`

Saves the empty state of a build field, like **Save empty state** in the admin window. `<field>` is the field id or its name. Not possible while a contest runs on the field.

### `/kseventadmin field retry <field>`

After a field reset failed, the field's reset is switched off. This switches it back on: "The reset of Harbor field is switched back on – it runs before the next contest." If a contest on that field starts within the next few minutes, the reset runs right away and anyone on the field is taken off it first. Same as **Retry reset** in the admin window.

### `/kseventadmin field selftest`

Tests the field reset at a free spot high above the default world: saves a small area, changes it, puts it back, compares it and checks that a reset can be stopped. The result is one line in the server log, `[Events] Field selftest PASS: ...` or `FAIL: <reason>`. The command ends with the result, at the latest after 90 seconds, so it can run as a boot command:

```
--boot-command "kseventadmin field selftest,stop"
```

### `/kseventadmin help`

Lists the admin commands.

---

## `/kslang`

Chooses your language for all KyuubiSoft mods: `/kslang de-DE` sets a language, `/kslang auto` follows the game language again. `/kslang` alone shows the current language and the available codes. The command is registered by the first KyuubiSoft mod that loads.