Описание

# 🎣 XFPoolManager (XFPM)
**XFPoolManager** is a **custom loot pool manager**.
It is designed primarily for **CosmicSMP** and servers with **advanced fishing systems**, but it can also be used as a general-purpose loot pool manager.
## 💡 Soft Dependencies:
- **NBT API**
- **Vault**
- **PlaceholderAPI**
> These plugins are **optional**. XFPM will integrate with them if present, but will function normally without them.
## 📜 General Description
XFPM allows you to define **main pools**, with **mini pools** inside them, and finally **items** inside those mini pools.
It also introduces **custom fishing enchantments** (stored as lore on fishing rods, not real enchantments) that affect loot behavior when rolling with `/xfpm loot`.
✅ If no fishing rod with the required lore is present → normal loot rules apply.
✅ If a fishing rod contains specific enchantments in its lore → the plugin modifies loot generation accordingly.
✅ Enchantments marked with `[X]` in the list below are **ignored** by XFPM.
## ✨ Features
- 🎲 **Configurable loot pools** with:
- Main pools → mini pools → items.
- Item rarities: `common, uncommon, rare, epic, mythic, legendary` (and anything rarer).
- Drop chances per item.
- Fixed or ranged amounts with optional **weighted probability**.
- Full **NBT tag** support (complex JSON supported).
- Custom messages (`%nl%` = line break).
- Console commands executed per reward.
- 🪝 **Custom Fishing Enchantments (for CosmicSMP)**:
- Work only if the player holds a fishing rod with the correct lore.
- Levels are expressed in Roman numerals (`I–VI` or `MAX`).
- No need for additional enchantment plugins.
- Modify loot roll logic dynamically:
- Rarer fish.
- More treasure.
- Increased amounts of fish or trash.
- Bonus XP.
- 🔄 Reload config on the fly: `/xfpm reload`.
- 📦 Works out-of-the-box with **CosmicSMP setups** and similar systems.
---
## 🧩 Custom Enchantments
### 🎲 Chance Boosts
- **Rare Catch** → Boosts chance of catching rarer items.
- **Treasure Finder** → Unlocks or increases chance for rolls in the `treasure` mini pool.
- **Bountiful Haul** → Increases amount of fish (+20% per level). Not compatible with *Wasteful Haul*.
- **Wasteful Haul** → Increases amount of trash (+15% per level). Not compatible with *Bountiful Haul*.
- **Angler’s Fortune** → Grants extra XP per successful catch.
### ⚡ Utility & Other (ignored by XFPM)
- Gambler’s Worth [X]
- Swift Bite [X]
- Endless Line [X]
📌 If the enchantment is **not present in lore** → no effect.
📌 If it is **present but marked [X]** → ignored safely.
---
## ⚙️ Commands
| Command | Description |
|---------|-------------|
| `/xfpm loot ` | Rolls loot for a player, applying enchantment modifiers if their fishing rod lore qualifies. |
| `/xfpm reload` / `/xfpmreload` | Reloads the plugin configuration without restarting the server. |
---
## 🛠️ Example `config.yml`
```yaml
pool_main:
fish:
salmon_common:
item: salmon
rarity: common
nbt:
- 'custom_name=[{"text":"Common Salmon","italic":false,"color":"white"}]'
message: "You caught a common salmon!"
amount: "1-2"
amount_weighted: false
chance: 0.5
commands:
- "say %player% caught a salmon!"
treasure:
golden_pearl:
item: ender_pearl
rarity: legendary
nbt:
- 'custom_name=[{"text":"Golden Pearl","italic":false,"color":"gold"}]'
message: "§6You fished up a Golden Pearl!%nl%§7Unbelievable luck!"
amount: "1"
amount_weighted: false
chance: 0.05
commands:
- "give %player% diamond 1"