# Installation

Install TrickOrTreat and Citizens, choose your event worlds and check the first startup.

## Requirements

TrickOrTreat runs on Spigot or Paper and requires **Citizens**. Install the full Citizens plugin distribution that supports your Minecraft version. A Citizens API or development artifact is not a server plugin.

The current plugin uses a minimum Bukkit API of **1.14**. That minimum is not a guarantee that every historical server build has been tested. Use the Java runtime required by your Minecraft server. Folia is not supported.

PlaceholderAPI, DeluxeShop and Multiverse-Core are optional. You can run a basic event without them.

## Install the plugin

1. Stop your server.
2. Install the matching Citizens build in `plugins/`.
3. Download TrickOrTreat from [SpigotMC](https://www.spigotmc.org/resources/61370/) or [Polymart / Voxel](https://voxel.shop/product/1507/trickortreat) and place its plugin JAR in `plugins/`.
4. Start the server and check the console for Citizens and TrickOrTreat startup errors.
5. Open `plugins/TrickOrTreat/config.yml` and set `General.enabled_worlds` to your event world names.
6. Grant organizers `trickortreat.admin` and participants `trickortreat.player` through your permissions plugin.

```yaml
General:
  enabled_worlds:
    - halloween
Storage:
  type: SQLITE
```

The example shows two settings inside the existing configuration. Edit the generated file rather than replacing it with this short snippet.

## Choose storage

**SQLite** is the default and keeps event progress in the plugin's local database. For MySQL, set `Storage.type: MYSQL` and configure `Storage.MySQL` with your host, port, database and credentials. A failed database connection prevents normal startup.

Back up the plugin folder and database before updating. The current costume-record encoding upgrades older records when they are saved; rolling back to an older build requires restoring the matching earlier database backup.

## Check the first visit

Run `/tot help`, then `/tot setupItem` as an organizer. Configure and save a door with the setup tools, start the event through its setup menu and test as a participant. Use `/tot open` to select a costume, right-click the registered door to knock and use `/tot stats` to check progress.

Continue with [event setup](/trickortreat/wiki/event-setup). If the plugin does not enable, check the required dependency and server versions before trying to configure doors.
