promotional bannermobile promotional banner

MafiX

Automated Mafia party game with a voiced host

# MafiX

**MafiX** is a Paper plugin that runs a full game of Mafia from start to finish without a live host. An admin builds a room with chairs and registers it once. After that, players press a button, take a seat at the table, and the game runs itself.

- πŸŽ™οΈ Voiced host. Two narrator voices, each with its own personality. The host player picks a voice before the game; by default one is chosen at random.
- πŸŒ™ Fair nights. Sleeping players receive no data about other players from the server, so peeking is impossible even with cheats.
- πŸ—³οΈ Chat voting. Player lists are clickable, votes can be changed, and results update in real time.
- πŸ”‡ Simple Voice Chat. Microphones are enabled only during discussion and last words.
- πŸŽ’ Item safety. Before the game, each player's inventory, XP, effects and position are saved to a file. Items are returned even after a server crash.
- πŸ“¦ Built-in resource pack. Sounds, music and visuals are served by the plugin itself, no separate hosting needed.

> ⚠️ Voice acting and in-game texts are in **Russian**. Messages can be translated in `messages.yml`.

## βš™οΈ Setup

### 1. Installation
1. Put `MafiX-1.0.jar` into the `plugins/` folder and start the server.
2. *(Optional)* Install **Simple Voice Chat** to let the game control microphones.
3. **Resource pack.** The plugin serves it by itself on port `8090`.
   - **Local / LAN testing:** nothing to configure.
   - **Public server:** open **TCP port 8090** in your firewall or hosting panel, then set your server's public IP or domain in `config.yml`:
     ```yaml
     resource-pack:
       host:
         port: 8090
         public-address: "play.example.com"
     ```
     Then run `/mafia reload`. If the port is not reachable, players won't get the pack and will be removed from the lobby.

### Hosts without extra ports (Aternos, etc.)
If you can't open port 8090, host the pack externally:
1. Take `plugins/MafiX/pack/MafiX-pack.zip` (created on first start).
2. Upload it to a host that gives a **direct download link** (e.g. mc-packs.net, GitHub Releases).
3. In `config.yml` set `resource-pack.mode: url`, plus `url` and `sha1` (40-character SHA-1 of the zip).
4. Run `/mafia reload`.

### 2. Building the room
Build a room with a table, **stairs as chairs** around it, and a **button** for joining.

### 3. Registering the arena
| Step | Command | What to do |
|---|---|---|
| 1 | `/mafia arena create <name>` | Create an arena (it becomes selected) |
| 2 | `/mafia arena sethologram` | Stand above the center of the table |
| 3 | `/mafia arena setbutton` | Look at the join button |
| 4 | `/mafia arena addseat` | Look at each stair one by one. Order = player number |
| 5 | `/mafia arena setmin <number>` | Minimum players (maximum = number of seats) |
| 6 | `/mafia arena enable` | Enable the arena |

The arena can only be enabled when the hologram and the button are set and there are at least as many seats as the minimum.

Useful commands:
- `/mafia arena removeseat` — remove the seat you are looking at
- `/mafia arena info`, `/mafia arena list` — check arenas
- `/mafia arena select <name>` — switch the selected arena
- `/mafia arena disable` / `delete <name>` — disable or delete an arena

> Any change to positions disables the arena — run `/mafia arena enable` again afterwards. Arenas cannot be edited while a lobby or game is running.

### 4. Playing
Players press the button and take a seat. The first player becomes the **lobby host** and gets a settings item to choose roles, the number of mafia members, timers and the narrator voice. The game starts automatically once enough players have joined.

### Commands & permissions
| Command | Permission | Description |
|---|---|---|
| `/mafia leave` | `mafia.play` (everyone) | Leave the lobby or game, items are returned |
| `/mafia arena …` | `mafia.admin` (op) | Arena setup |
| `/mafia stop <arena>` | `mafia.admin` | Stop a game and restore all players |
| `/mafia reload` | `mafia.admin` | Reload `config.yml` and `messages.yml` |

Alias: `/mafix`.

MafiX Team

profile avatar
  • 1
    Projects
  • 18
    Downloads