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

# SantumConditionalsPackets

{% embed url="<https://www.youtube.com/watch?v=Zdipu7kpjt4>" %}

**ConditionalsPackets** is a highly performant Minecraft plugin designed to render `schematics` (Sponge V3) to players **100% visually and client-side (packets)**

The main feature is that these schematics only appear if the player meets a series of variable conditions (using *PlaceholderAPI*), making it perfect for quests, temporary events, holographic structures, or dynamic maps

## ✨ Main Features

* **Packet Rendering (Client-Side)**: Blocks are never actually pasted into your server's world. They are sent via network packets directly to the player's eyes, preventing world corruption, heavy saves, or lag from physics updates (BlockUpdates)
* **Intangible and Protected Blocks**: To the player, the fake blocks feel as if they were in Adventure Mode. They cannot be destroyed, modified, or interacted with (like opening fake doors or chests)
* **Geometric Pre-Cache (Zero LAG)**: Ready for giant schematics. On startup, the server filters out all air blocks and compresses the schematic into RAM. When it needs to be sent to a player, it avoids calculating 1,000,000 3D blocks per second, requiring **0% CPU impact (MSPT)**
* **Network Grouping (MultiBlockChange)**: Compresses packet sending by chunks, ensuring your network doesn't saturate
* **Multi-SubFolder System:** You can create infinite .yml in Subfolders if you want
* **Smart Culling**: If a player is more than 100 blocks away from the origin coordinates, the plugin turns off Placeholder processing and math for that player, saving valuable resources
* **Full PlaceholderAPI Support**: You can use variables in the X, Y, Z axes, and even in world checking
* **Integrated Whitelist Mode**: Ability to force a schematic to only be seen by specific players through a real-time database
* **YAML Preservation (Text Scalpel)**: Unlike other plugins, ConditionalsPackets has a custom text editor in Java that **will never delete your comments (#)** when saving data via commands

## ⚙️ Configuration (Example)

Configuration files are saved in `/plugins/ConditionalsPackets/conditionals/`.

You can create as many subfolders and `.yml` files as you want to organize your quests or events.

```yaml
example_condition:
  enable: "yes" # Turns condition rendering on or off
  path: "my_schematic.schem" # Schematic path (must be inside the plugin folder)
  world: "world" # World where it will appear (accepts Placeholders)
  dimension: "overworld" # Options: overworld, nether, end
  X: "%player_x%+20" # X coordinate (supports addition, subtraction, and Placeholders)
  Y: "100"
  Z: "%player_z%"
  rotation: "none" # Options: none, flip_x, flip_y, flip_z
  noair: "yes" # yes = air blocks are not sent
  no_lava: "yes"
  no_water: "yes"
  
  # Visibility and Whitelist System
  viewer_none_mode: "global_visible" 
  # global_visible = everyone sees it if the list is empty 
  # global_invisible = spawns hidden
  viewer_list: none #DON'T TOUCH MANUALLY
  # List of allowed UUIDs If you put 'none', it respects viewer_none_mode
  
  # List of math or text conditions (PlaceholderAPI)
  conditions:
    - '%player_world% == world'
    - '%player_y% > 50'
```

## 💻 Commands and Permissions

All commands require the permission: `conditionalspackets.admin`

| Command                                | Description                                                                                                                                   |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `/cp reload`                           | Reloads all configurations, clears memory caches, reads new subfolders, and deletes ghost schematics on the fly without restarting the server |
| `/cp status <condition> <yes/no>`      | Globally enables (`yes`) or disables (`no`) a condition. Modifies the `.yml` in real time without deleting your comments                      |
| `/cp viewer set <cond> <player\|@p>`   | Adds a player to the schematic's Whitelist. `@p` is used for oneself                                                                          |
| `/cp viewer unset <cond> <player\|@p>` | Removes a player from the schematic's Whitelist. If the list becomes empty, it switches to `viewer_none_mode`                                 |

## 📐 Technical Details (Math Engine)

The plugin comes with an integrated math evaluator for the X, Y, Z coordinates

* You can write `100` and the plugin will use a *Fast-Path* processor that reads the number directly, saving calculations
* You can write `%player_x%+20` and the plugin will compile a math tree in real time to place the schematic relative to the player's position
* PlaceholderAPI math variables refresh asynchronously with a native Bukkit/Paper scheduler

## 📦 Dependencies

* Java 21+
* Paper 1.21.8 (Paper)
* [PlaceholderAPI](https://www.spigotmc.org/resources/placeholderapi.6245/) (Required)


---

# 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://donkolia.gitbook.io/minesantum/santumconditionalspackets.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.
