# Dependencies

## Dependencies

EnchantCore is designed to be flexible, running with a minimal setup but offering enhanced functionality when specific dependency plugins are installed.

### Core Requirements:

* **Spigot, Paper, or a compatible fork:** Version 1.17 or higher.
* **Java:** Version 17 or higher.

### Optional Dependencies (Soft-Dependencies):

These plugins are not strictly required for EnchantCore to load and operate its basic functions (like pickaxe leveling, simple enchant effects, Tokens economy). However, they enable significant features or provide better integration with your server.

***

#### **1. Vault**

* **Purpose:** Enables EnchantCore to use your server's existing economy system (e.g., EssentialsX Eco, CMI, etc.) for:
  * Enchantment upgrade costs.
  * Currency rewards from enchantments like Salary, Charity, etc. (if `EconomyType` in `config.yml` is set to `VAULT`).
  * The `/sellall` command and Auto-Sell features.
* **Status:** **Highly Recommended** if you want to use an existing server economy.
* **If not present:** EnchantCore-Premium will default to its internal "Tokens" currency system for costs and relevant rewards. `/sellall` and Auto-Sell features requiring Vault will not function.

***

#### **2. PlaceholderAPI (PAPI)**

* **Purpose:** Allows you to use EnchantCore specific placeholders in other plugins that support PAPI (e.g., scoreboards, chat formats, GUIs, holograms). Examples:
  * `%enchantcore_level%`
  * `%enchantcore_tokens_formatted%`
  * `%enchantcore_enchant_level_<enchant_raw_name>%`
* **Status:** **Recommended** for enhanced display of player stats and pickaxe information across your server.
* **If not present:** Placeholders specific to EnchantCore will not be parsed by other plugins. The core plugin functionality remains unaffected.

***

#### **3. WorldGuard**

* **Purpose:** WorldGuard integration is crucial for controlling where certain powerful enchantments can have an effect, especially area-of-effect (AoE) enchants.
  * **Custom Flag:** EnchantCore registers a custom WorldGuard flag: `enchantcore-effects` (defaults to DENY). You can set this flag to `ALLOW` in specific regions where you want these enchants to function.
  * **Enchantments Affected:**
    * **Disc:** Relies entirely on WorldGuard regions with the `enchantcore-effects: ALLOW` flag to determine the area for layer clearing. **It will likely not function as intended or safely without WorldGuard and properly configured regions.**
    * **Explosive & Nuke:** These enchantments will check the `enchantcore-effects` flag at the *target location* of each block they intend to break. If WorldGuard is not present, or if no regions deny the flag, their AoE might be unrestricted, potentially leading to unwanted block damage in protected areas.
* **Status:** **Strongly Recommended if using AoE enchantments like Disc, Explosive, or Nuke.**
* **If not present:**
  * The whole enchant system will fail to activate (if flag is not set), check back our [Getting Started](https://coziest-room.gitbook.io/coziest-docs/enchantcore/getting-started) to learn more.

***

**In summary:**

* **EnchantCore will load and run without any of these optional dependencies.**
* However, for the best experience and full feature set (especially server-wide economy, robust placeholders, and safe/controlled area-of-effect enchantments), installing Vault, PlaceholderAPI, and WorldGuard is highly recommended.

Always ensure you are using compatible versions of these dependency plugins with your server version and EnchantCore.


---

# Agent Instructions: 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://coziest-room.gitbook.io/coziest-docs/enchantcore/dependencies.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.
