> For the complete documentation index, see [llms.txt](https://kynosdeveloping.gitbook.io/kynosdeveloping/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kynosdeveloping.gitbook.io/kynosdeveloping/kynosheadhunter/storage-and-data-architecture.md).

# 📊 Storage & Data Architecture

HeadHunter utilizes an optimized flat-file architecture powered by `KynosLib` file helpers. This ensures clean, lightning-fast data processing during heavy gameplay events without locking up main server tick cycles.

***

### 🗺️ Target Storage (`heads.yml`)

When an administrator runs `/headhunter sethead`, the precise geographical vector blocks are written to `heads.yml` under an autoincrementing integer key system.

#### Internal File Example:

```yaml
heads:
  '1':
    world: world
    x: 102
    y: 64
    z: -451
  '2':
    world: world_nether
    x: -12
    y: 81
    z: 32
```

* This layout allows the plugin to instantly check block interactions via efficient key lookup algorithms rather than sweeping long spatial lists.

### 💾 Player Profiles (`players/` Directory)

To guarantee high scalability and avoid massive single-file database corruptions, each participant's logs are isolated in their own separate YAML layout inside the `players` subdirectory.

#### File Format (`players/PlayerName.yml`):

YAML

```
found_heads:
  - '1'
  - '2'
```

#### Why this design matters:

* Asynchronous Safety: Player states are queried and incremented per-profile, reducing disk overhead.
* Easy Maintenance: Administrators can wipe individual user progress easily by deleting a single file (e.g., `players/Notch.yml`) without interrupting active players.


---

# 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:

```
GET https://kynosdeveloping.gitbook.io/kynosdeveloping/kynosheadhunter/storage-and-data-architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
