> For the complete documentation index, see [llms.txt](https://ajneb97.gitbook.io/connecttheblocks/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajneb97.gitbook.io/connecttheblocks/how-to-start.md).

# How to Start

## Requirements

**1) Spigot**

{% hint style="info" %}
You need Spigot or Paper for the plugin to work. Don't use Craftbukkit.
{% endhint %}

**2) PlaceholderAPI**

{% hint style="info" %}
This dependency is optional. It will allow you to add requirements to unlock levels.&#x20;

<https://www.spigotmc.org/resources/placeholderapi.6245/>
{% endhint %}

## Installation

To install the plugin on your server just place the ConnectTheBlocks.jar file inside your plugins folder. Remember to use a Spigot/Paper server. Default categories and levels will be generated in the `levels` folder.

## How to Play

### The Inventory

To start playing you need to use the `/ctb` command. This will open the game main inventory. Here you will find the different categories. Categories are just a way to group levels by difficulty and maintain everything more organized. This inventory is completely [**configurable**](/connecttheblocks/inventory.yml-tutorial.md#inventories) and you can even add requirements to unlock categories.

<figure><img src="/files/C3iReXFaactNJNC0vRci" alt=""><figcaption></figcaption></figure>

Selecting a category will open an inventory with all of the levels from that category. Players need to complete levels in order to continue to the next ones. This inventory is not configurable, at least not the position of the items, however you can [**modify and translate them**](/connecttheblocks/inventory.yml-tutorial.md#level-selection). If a category has more than 40 levels, a new item will appear to move to the next levels.&#x20;

<figure><img src="/files/OON4w3KJAXdAYDbVC19O" alt=""><figcaption></figcaption></figure>

Click on the unlocked level to start playing. Opening a level will remove your inventory, but don't worry, your items will be safely stored (even if the server crashes). When exiting the level you'll get them back.

<figure><img src="/files/C1ID6qMo2H8gpV7JdbOb" alt=""><figcaption></figcaption></figure>

### The Game

Like I said before, the idea of the game is to connect the blocks with the same color. To accomplish that, you need to follow some rules:

**Information**

* Default start/end blocks will be present on every level. These blocks are fixed, players can't remove them.
* To start placing blocks, first you need to select one of the default ones by clicking on them. Then, to place a block of the selected type, left click on an empty slot on the inventory.
* If you want to remove blocks of the same type, right click one of them.
* To complete the level you need to fill all the empty slots of the inventory, connecting the default blocks.

**Rule 1**

Blocks of the same type must be connected.

<figure><img src="/files/qyQ0mRohsSNVfMbWDqfD" alt=""><figcaption></figcaption></figure>

**Rule 2**

You need to follow just one line. You can't place blocks from both the start and the end block at the same time. If you do, the placed blocks will be removed.

<figure><img src="/files/C2vqIqHDvOEUcLAPoJkU" alt=""><figcaption></figcaption></figure>

**Rule 3**

The blocks can not have more than 2 blocks of the same type around them. So, these kind of movement are not possible to make.

<figure><img src="/files/SiwF4qpphO9bJ2T0sqSR" alt=""><figcaption></figcaption></figure>

**Rule 4**

The path must not have any kind of bifurcations.

<figure><img src="/files/puGC8MEyvx7XupclxQ4L" alt=""><figcaption></figcaption></figure>

## Create/Edit Levels

Before creating a level you should create a new category by duplicating a category file under the `levels`  folder. Modify the options you want and remember to delete the "levels" path so you start creating levels from scratch.

{% hint style="info" %}
If you are creating a new category remember to add it to the main inventory in the inventory.yml file!
{% endhint %}

Now use `/ctb createlevel`. You'll need to choose the created category and the type/shape of the new level. These shapes are defined in the **level\_inventory\_types** option in the `inventory.yml` file.

<figure><img src="/files/nNkPiZau9pFqygQ6Psua" alt=""><figcaption></figcaption></figure>

Now you need to start placing the default blocks first (the start and end blocks). If you make a mistake you can remove the blocks by right clicking them. The same rules applies. When you finish, click on the Create Level button.

<figure><img src="/files/q6Uw3TFp9NjmIlCC85pZ" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ajneb97.gitbook.io/connecttheblocks/how-to-start.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
