# TItems

# TItems — Présentation Générale / Overview

> **Plugin :** TItems  
> **Auteur / Author :** TotallyStudios  
> **Version Minecraft :** 1.8.8  
> **Type de serveur / Server type :** Faction

---

## FR — Description

**TItems** est un plugin Minecraft 1.8.8 développé par TotallyStudios pour les serveurs Faction.  
Il ajoute une large collection d'items personnalisés avec des comportements uniques gérés via un système de **behaviors** (comportements) chargés depuis `items.yml`.

### Ce que le plugin apporte

- **Items de combat** : armes épiques liées au joueur, observateurs de potions/armure, hook
- **Items de ferme** : haches, houes, épées spécialisées pour les fermes à monstres et cultures
- **Items de construction** : builders qui placent des blocs automatiquement
- **Orbes** : consommables accordant des effets de potion temporaires
- **Sceptre de téléportation** : se téléporter vers ses ennemis en combat
- **Sacs de butin (Lootbags)** : récompenses aléatoires par tier (common → legendary)
- **Masques** : multiplicateurs d'argent et d'XP Jobs
- **Boss Eggs** : spawner des boss personnalisés configurables
- **Hache de ferme évolutive** : système de progression à 4 niveaux

### Architecture technique

Chaque item est défini dans `items.yml` avec un `behavior` qui détermine son comportement.  
Les behaviors sont des classes Java chargées au démarrage et instanciées par `BehaviorList`.  
Les données persistantes par joueur/item (kills, uses, stats) sont stockées via **NBT** directement sur l'item.

---

## EN — Description

**TItems** is a Minecraft 1.8.8 plugin developed by TotallyStudios for Faction servers.  
It adds a wide collection of custom items with unique behaviors managed via a **behavior** system loaded from `items.yml`.

### What the plugin provides

- **Combat items**: epic player-bound weapons, potion/armor observers, hook
- **Farming items**: axes, hoes, swords specialized for mob and crop farms
- **Builder items**: axes that automatically place blocks
- **Orbs**: consumables granting temporary potion effects
- **Teleportation Scepter**: teleport to enemies during combat
- **Lootbags**: random rewards by tier (common → legendary)
- **Masks**: money and Jobs XP multipliers
- **Boss Eggs**: spawn configurable custom bosses
- **Upgradable Farm Axe**: 4-level progression system

### Technical architecture

Each item is defined in `items.yml` with a `behavior` that determines its logic.  
Behaviors are Java classes loaded at startup and instantiated by `BehaviorList`.  
Per-player/item persistent data (kills, uses, stats) is stored via **NBT** directly on the item.

---

## Fichiers de configuration / Config files

<table id="bkmrk-fichier-%2F-file-r%C3%B4le-"><thead><tr><th>Fichier / File</th><th>Rôle FR</th><th>Role EN</th></tr></thead><tbody><tr><td>`config.yml`</td><td>Format d'affichage des nombres</td><td>Number display format</td></tr><tr><td>`items.yml`</td><td>Définition de tous les items</td><td>All item definitions</td></tr><tr><td>`lang.yml`</td><td>Messages envoyés aux joueurs</td><td>Messages sent to players</td></tr><tr><td>`LANG/items_FR.yml`</td><td>Noms d'items en français</td><td>Item names in French</td></tr><tr><td>`LANG/items_EN.yml`</td><td>Noms d'items en anglais</td><td>Item names in English</td></tr></tbody></table>

# TItems — Dépendances & Installation / Dependencies & Installation

#  

## Dépendances obligatoires / Required Dependencies

<table id="bkmrk-plugin-r%C3%B4le-fr-role-"><thead><tr><th>Plugin</th><th>Rôle FR</th><th>Role EN</th></tr></thead><tbody><tr><td>**Vault**</td><td>Gestion de l'économie</td><td>Economy management</td></tr><tr><td>**Factions**</td><td>Intégration claims / factions</td><td>Factions &amp; claims integration</td></tr></tbody></table>

> ⚠️ Sans Vault ou Factions, le plugin **ne démarrera pas**. / Without Vault or Factions, the plugin **will not start**.

---

## Dépendances optionnelles / Soft Dependencies

<table id="bkmrk-plugin-fonctionnalit"><thead><tr><th>Plugin</th><th>Fonctionnalité activée FR</th><th>Feature EN</th></tr></thead><tbody><tr><td>**ShopGUIPlus**</td><td>Vente d'items via le shop</td><td>Item selling via shop</td></tr><tr><td>**Jobs**</td><td>Multiplicateur XP pour les masques</td><td>XP multiplier for masks</td></tr><tr><td>**CombatTagPlus**</td><td>Détection du combat (Sceptre)</td><td>Combat detection (Scepter)</td></tr><tr><td>**Quests**</td><td>Intégration quêtes</td><td>Quest integration</td></tr><tr><td>**PlaceholderAPI**</td><td>Placeholders boss `%tboss_...%`</td><td>Boss placeholders</td></tr></tbody></table>

---

## Installation

### FR

1. Placer le fichier `.jar` dans le dossier `/plugins/`
2. S'assurer que **Vault** et **Factions** sont présents et fonctionnels
3. Démarrer le serveur — les fichiers de config sont générés automatiquement dans `plugins/TItems/`
4. Arrêter le serveur
5. Éditer `plugins/TItems/items.yml` pour configurer les items
6. Éditer `plugins/TItems/lang.yml` pour personnaliser les messages
7. Redémarrer le serveur ou utiliser `/titems reload`

### EN

1. Place the `.jar` file in the `/plugins/` folder
2. Ensure **Vault** and **Factions** are present and working
3. Start the server — config files are auto-generated in `plugins/TItems/`
4. Stop the server
5. Edit `plugins/TItems/items.yml` to configure items
6. Edit `plugins/TItems/lang.yml` to customize messages
7. Restart the server or use `/titems reload`

---

## Rechargement de la config / Config Reload

La commande `/titems reload` recharge tous les fichiers de configuration sans redémarrer le serveur.  
The `/titems reload` command reloads all config files without restarting the server.

```
/titems reload
Permission: totallycore.reload

```

> ℹ️ Un rechargement en cours de partie peut provoquer des comportements inattendus si des boss sont actifs. Il est recommandé de recharger hors période d'activité.  
> A reload mid-game may cause unexpected behavior if bosses are active. Recommended to reload during downtime.

# TItems — Commandes & Permissions / Commands & Permissions

#  

## Commandes / Commands

<table id="bkmrk-commande-%2F-command-d"><thead><tr><th>Commande / Command</th><th>Description FR</th><th>Description EN</th><th>Permission</th></tr></thead><tbody><tr><td>`/items`</td><td>Affiche l'aide des commandes items</td><td>Displays items command help</td><td>`totallycore.items`</td></tr><tr><td>`/items give <joueur> <item> <qté>`</td><td>Donne un item à un joueur</td><td>Gives an item to a player</td><td>`totallycore.items`</td></tr><tr><td>`/items give <joueur> armor 1`</td><td>Donne l'armure de ferme complète (4 pièces)</td><td>Gives the full farm armor set (4 pieces)</td><td>`totallycore.items`</td></tr><tr><td>`/items help`</td><td>Liste tous les items disponibles</td><td>Lists all available items</td><td>`totallycore.items`</td></tr><tr><td>`/items menu`</td><td>Ouvre le menu des items en GUI</td><td>Opens the items GUI menu</td><td>`totallycore.items`</td></tr><tr><td>`/titems reload`</td><td>Recharge toutes les configurations</td><td>Reloads all configurations</td><td>`totallycore.reload`</td></tr></tbody></table>

---

## Détail des commandes / Command Details

### `/items give`

```
/items give <joueur> <item> <quantité>
/items give <joueur> armor <quantité>

```

- `<joueur>` — nom exact du joueur en ligne / exact name of an online player
- `<item>` — clé de l'item dans `items.yml` (ex: `hammer3`, `orbe_fire`, `farming_sword_1`) — **sensible à la casse / case-sensitive**
- `<quantité>` — nombre entier ≥ 1
- Le raccourci `armor` donne automatiquement les 4 pièces de l'armure de ferme / The `armor` shortcut gives all 4 farm armor pieces at once

**Exemples / Examples :**

```
/items give Steve hammer3 1
/items give Alex orbe_magique 3
/items give Notch armor 1
/items give TotallyAdmin lootbag_legendary 1

```

### `/titems reload`

Recharge `config.yml`, `items.yml` et `lang.yml` à chaud.  
Reloads `config.yml`, `items.yml`, and `lang.yml` at runtime.

---

## Permissions

<table id="bkmrk-n%C5%93ud-%2F-node-acc%C3%A8s-do"><thead><tr><th>Nœud / Node</th><th>Accès donné FR</th><th>Access Granted EN</th></tr></thead><tbody><tr><td>`totallycore.items`</td><td>Toutes les commandes `/items`</td><td>All `/items` commands</td></tr><tr><td>`totallycore.reload`</td><td>Commande `/titems reload`</td><td>`/titems reload` command</td></tr></tbody></table>

---

## Messages d'erreur / Error Messages

Définis dans `lang.yml` sous `items.give.*` :

<table id="bkmrk-cl%C3%A9-%2F-key-situation-"><thead><tr><th>Clé / Key</th><th>Situation</th></tr></thead><tbody><tr><td>`items.give.usage`</td><td>Syntaxe incorrecte / Wrong syntax</td></tr><tr><td>`items.give.player-not-found`</td><td>Joueur introuvable / Player not found</td></tr><tr><td>`items.give.no-item`</td><td>Clé d'item inexistante / Unknown item key</td></tr><tr><td>`items.give.invalid-item`</td><td>Item mal configuré dans items.yml / Misconfigured item</td></tr><tr><td>`items.give.invalid-amount`</td><td>Quantité invalide / Invalid amount</td></tr><tr><td>`items.give.success`</td><td>Don réussi / Successful give</td></tr></tbody></table>

# TItems — Armure de Ferme & Items de Combat / Farm Armor & Combat Items

#  

## Armure de Ferme / Farm Armor

### FR

L'armure de ferme est un set complet de 4 pièces en fer. Lorsque le **set entier** est porté, il confère des effets permanents au joueur, y compris le vol infini dans ses claims.

### EN

The farm armor is a full iron set of 4 pieces. When the **full set** is worn, it grants permanent effects, including infinite flight within the player's claims.

### Pièces / Pieces

<table id="bkmrk-cl%C3%A9-items.yml-nom-af"><thead><tr><th>Clé `items.yml`</th><th>Nom affiché / Display Name</th><th>Type Minecraft</th></tr></thead><tbody><tr><td>`farm.helmet`</td><td>✦ Farming Helmet ✦</td><td>`IRON_HELMET`</td></tr><tr><td>`farm.chestplate`</td><td>✦ Farming Chestplate ✦</td><td>`IRON_CHESTPLATE`</td></tr><tr><td>`farm.leggings`</td><td>✦ Farming Leggings ✦</td><td>`IRON_LEGGINGS`</td></tr><tr><td>`farm.boots`</td><td>✦ Farming Boots ✦</td><td>`IRON_BOOTS`</td></tr></tbody></table>

### Effets (set complet) / Effects (full set)

<table id="bkmrk-effet-%2F-effect-nivea"><thead><tr><th>Effet / Effect</th><th>Niveau / Level</th><th>Condition</th></tr></thead><tbody><tr><td>Speed / Vitesse</td><td>II</td><td>Set complet / Full set</td></tr><tr><td>Fire Resistance</td><td>I</td><td>Set complet / Full set</td></tr><tr><td>Haste / Célérité</td><td>II</td><td>Set complet / Full set</td></tr><tr><td>No Fall Damage</td><td>—</td><td>Set complet / Full set</td></tr><tr><td>Fly (infini dans les claims)</td><td>—</td><td>Dans un claim allié / Allied claim</td></tr></tbody></table>

### Give raccourci / Shortcut give

```
/items give <joueur> armor 1

```

Donne les 4 pièces en une seule commande. / Gives all 4 pieces in one command.

---

## Items de Combat / Combat Items

### Knight's Chestplate &amp; Lord's Rod

<table id="bkmrk-propri%C3%A9t%C3%A9-valeur-cl%C3%A9"><thead><tr><th>Propriété</th><th>Valeur</th></tr></thead><tbody><tr><td>Clés `items.yml`</td><td>`god_chestplate`, `god_rod`</td></tr><tr><td>Behavior</td><td>`basic`</td></tr><tr><td>Rareté / Rarity</td><td>EPIC</td></tr><tr><td>`can-drop`</td><td>`false` — ne peut pas être jeté / cannot be dropped</td></tr><tr><td>`drop-on-death`</td><td>`false` — ne drop pas à la mort / does not drop on death</td></tr><tr><td>`unbreakable`</td><td>`true`</td></tr></tbody></table>

> Ces items sont **liés au joueur** : ils reviennent automatiquement dans l'inventaire après la mort.  
> These items are **player-bound**: they automatically return to inventory after death.

---

### Divine Bow ⚔

<table id="bkmrk-propri%C3%A9t%C3%A9-valeur-cl%C3%A9-1"><thead><tr><th>Propriété</th><th>Valeur</th></tr></thead><tbody><tr><td>Clé `items.yml`</td><td>`god_bow`</td></tr><tr><td>Behavior</td><td>`god_bow`</td></tr><tr><td>Rareté / Rarity</td><td>EPIC</td></tr><tr><td>Enchantements</td><td>`ARROW_KNOCKBACK 2`, `ARROW_INFINITE 1`</td></tr><tr><td>`can-drop` / `drop-on-death`</td><td>`false` / `false`</td></tr><tr><td>`unbreakable`</td><td>`true`</td></tr><tr><td>Stat affichée / Displayed stat</td><td>`{hits}` — entités touchées / entities hit</td></tr></tbody></table>

Arc épique lié au joueur, indestructible, avec flèches infinies. Suit le nombre d'entités touchées.  
Epic player-bound bow, indestructible, with infinite arrows. Tracks entities hit.

---

### Divine Blade ⚔

<table id="bkmrk-propri%C3%A9t%C3%A9-valeur-cl%C3%A9-2"><thead><tr><th>Propriété</th><th>Valeur</th></tr></thead><tbody><tr><td>Clé `items.yml`</td><td>`god_dager`</td></tr><tr><td>Behavior</td><td>`god_dager`</td></tr><tr><td>Rareté / Rarity</td><td>EPIC</td></tr><tr><td>Enchantements</td><td>`DAMAGE_ALL 5`, `FIRE_ASPECT 1`, `DURABILITY 4`</td></tr><tr><td>`can-drop` / `drop-on-death`</td><td>`false` / `false`</td></tr><tr><td>Stats affichées</td><td>`{kill}` — kills joueurs / player kills + dernier kill / last kill</td></tr></tbody></table>

Épée épique liée au joueur. Affiche le compteur de kills et le dernier joueur éliminé.  
Epic player-bound sword. Displays kill counter and last eliminated player.

---

### Potion Observer

<table id="bkmrk-propri%C3%A9t%C3%A9-valeur-cl%C3%A9-3"><thead><tr><th>Propriété</th><th>Valeur</th></tr></thead><tbody><tr><td>Clé `items.yml`</td><td>`potioncounter`</td></tr><tr><td>Behavior</td><td>`potioncounter`</td></tr><tr><td>Rareté / Rarity</td><td>RARE</td></tr><tr><td>Déclencheur / Trigger</td><td>Clic droit sur un joueur / Right-click on a player</td></tr><tr><td>`maxUses`</td><td>`5`</td></tr></tbody></table>

Clic droit sur un joueur pour voir le **nombre de potions** dans son inventaire.  
Right-click a player to see the **number of potions** in their inventory.

---

### Durability Observer

<table id="bkmrk-propri%C3%A9t%C3%A9-valeur-cl%C3%A9-4"><thead><tr><th>Propriété</th><th>Valeur</th></tr></thead><tbody><tr><td>Clé `items.yml`</td><td>`armorcounter`</td></tr><tr><td>Behavior</td><td>`armorcounter`</td></tr><tr><td>Rareté / Rarity</td><td>RARE</td></tr><tr><td>Déclencheur / Trigger</td><td>Clic droit sur un joueur / Right-click on a player</td></tr><tr><td>`maxUses`</td><td>`5`</td></tr></tbody></table>

Clic droit sur un joueur pour voir la **durabilité restante** de chaque pièce d'armure (casque, plastron, pantalon, bottes).  
Right-click a player to see the **remaining durability** of each armor piece (helmet, chestplate, leggings, boots).

---

### Hook

<table id="bkmrk-propri%C3%A9t%C3%A9-valeur-cl%C3%A9-5"><thead><tr><th>Propriété</th><th>Valeur</th></tr></thead><tbody><tr><td>Clé `items.yml`</td><td>`hook`</td></tr><tr><td>Behavior</td><td>`hook`</td></tr><tr><td>Rareté / Rarity</td><td>RARE</td></tr><tr><td>`maxUses`</td><td>`5`</td></tr></tbody></table>

Permet d'**ouvrir une porte** à l'intérieur d'un claim ennemi.  
Allows **opening a door** inside an enemy claim.

# TItems — Items de Ferme / Farming Items

#  

## XP Pickaxe

<table id="bkmrk-propri%C3%A9t%C3%A9-valeur-cl%C3%A9"><thead><tr><th>Propriété</th><th>Valeur</th></tr></thead><tbody><tr><td>Clé `items.yml`</td><td>`exp_pickaxe`</td></tr><tr><td>Behavior</td><td>`exp_pickaxe`</td></tr><tr><td>Rareté / Rarity</td><td>RARE</td></tr><tr><td>Type Minecraft</td><td>`DIAMOND_PICKAXE`</td></tr><tr><td>Enchantements</td><td>`DIG_SPEED 5`, `DURABILITY 4`</td></tr><tr><td>Stat affichée</td><td>`{block_broken}` — blocs minés / blocks mined</td></tr></tbody></table>

**FR** — Pioche avec **20% de chance** d'obtenir 2 XP en minant des minerais. Suit le nombre total de blocs minés.  
**EN** — Pickaxe with a **20% chance** to gain 2 XP when mining ores. Tracks total blocks mined.

---

## Hammer

<table id="bkmrk-propri%C3%A9t%C3%A9-valeur-cl%C3%A9-1"><thead><tr><th>Propriété</th><th>Valeur</th></tr></thead><tbody><tr><td>Clé `items.yml`</td><td>`hammer3`</td></tr><tr><td>Behavior</td><td>`hammer`</td></tr><tr><td>Rareté / Rarity</td><td>RARE</td></tr><tr><td>Type Minecraft</td><td>`DIAMOND_PICKAXE`</td></tr><tr><td>`max-uses`</td><td>`3500`</td></tr><tr><td>`breaking-chance`</td><td>`1.0` (100%)</td></tr><tr><td>Enchantements</td><td>`DIG_SPEED 5`, `DURABILITY 15`</td></tr><tr><td>Stat affichée</td><td>`{uses}` / `3500`</td></tr><tr><td>Blacklist blocs</td><td>`BEDROCK`, `LADDER`, `MOB_SPAWNER`</td></tr></tbody></table>

**FR** — Pioche qui mine en **zone 3×3**. Les blocs de la blacklist ne sont pas affectés par l'effet de zone.  
**EN** — Pickaxe that mines a **3×3 area**. Blacklisted blocks are not affected by the area effect.

---

## Farm Axe (basique / basic)

<table id="bkmrk-propri%C3%A9t%C3%A9-valeur-cl%C3%A9-2"><thead><tr><th>Propriété</th><th>Valeur</th></tr></thead><tbody><tr><td>Clé `items.yml`</td><td>`farm_axe`</td></tr><tr><td>Behavior</td><td>`multitool`</td></tr><tr><td>Rareté / Rarity</td><td>RARE</td></tr><tr><td>Type Minecraft</td><td>`DIAMOND_AXE`</td></tr><tr><td>Enchantements</td><td>`DIG_SPEED 10`, `DURABILITY 4`</td></tr><tr><td>Stat affichée</td><td>`{block_broken}`</td></tr></tbody></table>

**FR** — Hache polyvalente qui **s'adapte au bloc cassé** (arbre, cacao, etc.). Variante non-évolutive. Pour la version évolutive, voir la page dédiée.  
**EN** — Versatile axe that **adapts to the broken block**. Non-upgradable variant. For the upgradable version, see the dedicated page.

---

## Harvester (Lvl 1 &amp; 2)

<table id="bkmrk-propri%C3%A9t%C3%A9-lvl-1-lvl-"><thead><tr><th>Propriété</th><th>Lvl 1</th><th>Lvl 2</th></tr></thead><tbody><tr><td>Clé `items.yml`</td><td>`harvester_1`</td><td>`harvester_2`</td></tr><tr><td>Behavior</td><td>`harvester`</td><td>`harvester`</td></tr><tr><td>Type Minecraft</td><td>`WOOD_HOE`</td><td>`DIAMOND_HOE`</td></tr><tr><td>`range`</td><td>`0` (1×1)</td><td>`0` (1×1)</td></tr><tr><td>`multiplier`</td><td>`x1`</td><td>`x2`</td></tr><tr><td>`auto-sell`</td><td>`false`</td><td>`false`</td></tr><tr><td>Upgrade vers / to</td><td>`harvester_2`</td><td>`harvester_X` (custom)</td></tr><tr><td>`unbreakable`</td><td>`true`</td><td>`true`</td></tr></tbody></table>

**FR** — Houe qui **récolte et replante automatiquement** les cultures. Le Lvl 2 double le rendement. S'upgrade après avoir atteint les seuils de récolte.  
**EN** — Hoe that **auto-harvests and replants** crops. Lvl 2 doubles yield. Upgrades after reaching harvest thresholds.

### Conditions d'upgrade / Upgrade conditions

<table id="bkmrk-culture-%2F-crop-seuil"><thead><tr><th>Culture / Crop</th><th>Seuil / Threshold</th></tr></thead><tbody><tr><td>Blé / Wheat (`CROPS`)</td><td>10 000</td></tr><tr><td>Nether Wart</td><td>10 000</td></tr><tr><td>Carottes / Carrots (`CARROT`)</td><td>10 000</td></tr></tbody></table>

> Toutes les cultures doivent atteindre le seuil simultanément pour déclencher l'upgrade.  
> All crops must reach the threshold simultaneously to trigger the upgrade.

---

## Farming Sword (Lvl 1 &amp; 2)

<table id="bkmrk-propri%C3%A9t%C3%A9-lvl-1-lvl--1"><thead><tr><th>Propriété</th><th>Lvl 1</th><th>Lvl 2</th></tr></thead><tbody><tr><td>Clé `items.yml`</td><td>`farming_sword_1`</td><td>`farming_sword_2`</td></tr><tr><td>Behavior</td><td>`farming_sword`</td><td>`farming_sword`</td></tr><tr><td>Type Minecraft</td><td>`DIAMOND_SWORD`</td><td>`DIAMOND_SWORD`</td></tr><tr><td>`unbreakable`</td><td>`true`</td><td>`true`</td></tr><tr><td>`auto-sell`</td><td>`false`</td><td>`false`</td></tr><tr><td>Enchantements</td><td>`DAMAGE_UNDEAD 5`, `LOOT_BONUS_MOBS 5`, `DAMAGE_ARTHROPODS 5`</td><td>`DAMAGE_UNDEAD 7`, `LOOT_BONUS_MOBS 7`, `DAMAGE_ARTHROPODS 5`</td></tr></tbody></table>

**FR** — Épée spécialisée pour **one-shot les monstres de ferme** (zombies, squelettes, araignées). Le Lvl 2 a des enchantements supérieurs. S'upgrade après 100 000 kills de chaque type.  
**EN** — Sword specialized for **one-shotting farm mobs** (zombies, skeletons, spiders). Lvl 2 has higher enchants. Upgrades after 100,000 kills of each type.

### Conditions d'upgrade / Upgrade conditions

<table id="bkmrk-monstre-%2F-mob-seuil-"><thead><tr><th>Monstre / Mob</th><th>Seuil / Threshold</th></tr></thead><tbody><tr><td>Zombie</td><td>100 000</td></tr><tr><td>Skeleton / Squelette</td><td>100 000</td></tr><tr><td>Spider / Araignée</td><td>100 000</td></tr></tbody></table>

### Stats affichées / Displayed stats

```
{zombie_kill}    — zombies tués / zombies killed
{skeleton_kill}  — squelettes tués / skeletons killed
{spider_kill}    — araignées tuées / spiders killed

```

# TItems — Builders, Orbes, Sceptre & Sell Stick

#  

## Items de Construction / Builder Items

**FR** — Les builders sont des haches en fer avec le behavior `placer`. Ils **placent automatiquement un bloc** à intervalle régulier (15 ticks = 0,75 s). Ils ne peuvent pas être utilisés dans les zones protégées.  
**EN** — Builders are iron axes with the `placer` behavior. They **auto-place a block** at a regular interval (15 ticks = 0.75 s). They cannot be used in protected areas.

<table id="bkmrk-cl%C3%A9-items.yml-nom-af"><thead><tr><th>Clé `items.yml`</th><th>Nom affiché</th><th>Bloc placé / Block</th><th>Uses</th><th>Période / Period</th></tr></thead><tbody><tr><td>`obsi`</td><td>Bâtisseuse à Obsidienne</td><td>`OBSIDIAN`</td><td>30</td><td>15 ticks</td></tr><tr><td>`iron`</td><td>IronBlock Builder</td><td>`IRON_BLOCK`</td><td>30</td><td>15 ticks</td></tr><tr><td>`sand`</td><td>Sand Builder</td><td>`SAND`</td><td>30</td><td>15 ticks</td></tr><tr><td>`dirt`</td><td>Dirt Builder</td><td>`DIRT`</td><td>30</td><td>15 ticks</td></tr><tr><td>`soul_sand`</td><td>Soul Sand Builder</td><td>`SOUL_SAND`</td><td>30</td><td>15 ticks</td></tr><tr><td>`lava`</td><td>Lava Builder</td><td>`LAVA`</td><td>30</td><td>15 ticks</td></tr></tbody></table>

> ℹ️ Le bloc est placé sur la **face du bloc cliqué** (`face: block`). Le message `placer-dont` dans `lang.yml` s'affiche si l'utilisation est refusée.

---

## Orbes / Orbs

**FR** — Les orbes sont des items consommables (behavior `orbe`) qui appliquent des **effets de potion pendant 10 minutes**. Maximum **3 utilisations** par orbe.  
**EN** — Orbs are consumable items (`orbe` behavior) that apply **potion effects for 10 minutes**. Maximum **3 uses** per orb.

<table id="bkmrk-cl%C3%A9-items.yml-nom-af-1"><thead><tr><th>Clé `items.yml`</th><th>Nom affiché</th><th>Rareté</th><th>Effets / Effects</th></tr></thead><tbody><tr><td>`orbe_fire`</td><td>Fire Orb</td><td>RARE</td><td>Fire Resistance I (10 min)</td></tr><tr><td>`orbe_speed`</td><td>Speed Orb</td><td>RARE</td><td>Speed II (10 min)</td></tr><tr><td>`orbe_force`</td><td>Strength Orb</td><td>RARE</td><td>Strength I (10 min)</td></tr><tr><td>`orbe_haste`</td><td>Haste Orb</td><td>RARE</td><td>Haste I (10 min)</td></tr><tr><td>`orbe_magique`</td><td>Ultimate Orb</td><td>EPIC</td><td>Fire Resistance + Speed II + Strength + Haste (10 min)</td></tr></tbody></table>

> L'**Ultimate Orb** combine tous les effets des 4 orbes en un seul item.  
> The **Ultimate Orb** combines all 4 orb effects into a single item.

---

## Sceptre de Téléportation / Teleportation Scepter

<table id="bkmrk-propri%C3%A9t%C3%A9-valeur-cl%C3%A9"><thead><tr><th>Propriété</th><th>Valeur</th></tr></thead><tbody><tr><td>Clé `items.yml`</td><td>`scepter`</td></tr><tr><td>Behavior</td><td>`scepter`</td></tr><tr><td>Rareté / Rarity</td><td>RARE</td></tr><tr><td>Type Minecraft</td><td>`BLAZE_ROD`</td></tr><tr><td>`uses`</td><td>`5`</td></tr><tr><td>`delay`</td><td>`3` secondes / seconds</td></tr><tr><td>Stat affichée</td><td>`{uses}` / `5`</td></tr></tbody></table>

**FR** — Permet de se **téléporter vers ses ennemis** pendant un combat actif. Nécessite d'être en combat (CombatTagPlus). Un délai de 3 secondes s'applique avant la téléportation.  
**EN** — Allows **teleporting to enemies** during active combat. Requires a CombatTag (CombatTagPlus). A 3-second delay applies before teleportation.

### Conditions d'utilisation / Usage conditions

- Le joueur doit être **en combat** (tag CombatTagPlus actif)
- Un **cooldown** s'applique entre chaque utilisation
- Sans CombatTagPlus, le message `items.scepter.not-combat` s'affiche

### Messages `lang.yml`

<table id="bkmrk-cl%C3%A9-%2F-key-situation-"><thead><tr><th>Clé / Key</th><th>Situation</th></tr></thead><tbody><tr><td>`items.scepter.not-combat`</td><td>Sceptre utilisé hors combat</td></tr><tr><td>`items.scepter.cooldown`</td><td>Sceptre en cooldown (`%time%` secondes restantes)</td></tr><tr><td>`items.scepter.teleport-delay`</td><td>Téléportation dans `%time%` secondes</td></tr></tbody></table>

---

## Sell Stick (Bâton Vendeur / Seller Stick)

**FR** — Le Sell Stick (behavior `sell_stick`) permet de **vendre automatiquement le contenu d'un coffre** en faisant clic droit dessus. Applique un multiplicateur au prix de vente.  
**EN** — The Sell Stick (`sell_stick` behavior) **auto-sells a chest's contents** on right-click. Applies a price multiplier.

<table id="bkmrk-cl%C3%A9-items.yml-nom-af-2"><thead><tr><th>Clé `items.yml`</th><th>Nom affiché</th><th>Multiplicateur / Multiplier</th><th>Utilisations / Uses</th></tr></thead><tbody><tr><td>`sell_stick4`</td><td>Basic Seller</td><td>x1.25</td><td>135</td></tr><tr><td>`sell_stick`</td><td>Advanced Seller</td><td>x1.5</td><td>235</td></tr><tr><td>`sell_stick3`</td><td>Magic Seller</td><td>x2.0</td><td>325</td></tr></tbody></table>

> ⚠️ Le joueur doit avoir **accès au coffre** pour pouvoir le vendre. Message d'erreur si l'accès est refusé : `listeners.sell-stick.cannot-access`.

# TItems — Lootbags, Masques, Hache Évolutive & Boss Eggs

#  

## Sacs de Butin / Lootbags

**FR** — Les lootbags (behavior `lootbag`) s'ouvrent en **clic droit**. Ils accordent une récompense aléatoire parmi celles configurées, selon un système de chances en pourcentage.  
**EN** — Lootbags (`lootbag` behavior) open on **right-click**. They grant a random reward from those configured, based on a percentage chance system.

<table id="bkmrk-cl%C3%A9-items.yml-nom-af"><thead><tr><th>Clé `items.yml`</th><th>Nom affiché</th><th>Tier</th><th>Son / Sound</th><th>Effet particule</th></tr></thead><tbody><tr><td>`lootbag_common`</td><td>Common LootBag</td><td>`common`</td><td>`LEVEL_UP`</td><td>`HAPPY_VILLAGER`</td></tr><tr><td>`lootbag_rare`</td><td>Rare LootBag</td><td>`rare`</td><td>`LEVEL_UP`</td><td>`WITCH_MAGIC`</td></tr><tr><td>`lootbag_epic`</td><td>Epic LootBag</td><td>`epic`</td><td>`LEVEL_UP`</td><td>`PORTAL`</td></tr><tr><td>`lootbag_legendary`</td><td>Legendary LootBag</td><td>`legendary`</td><td>`ENDERDRAGON_GROWL`</td><td>`FLAME`</td></tr></tbody></table>

### Récompenses par tier / Rewards by tier

**Common**

<table id="bkmrk-r%C3%A9compense-chance-di"><thead><tr><th>Récompense</th><th>Chance</th></tr></thead><tbody><tr><td>Diamond ×1</td><td>30%</td></tr><tr><td>Iron Ingot ×5</td><td>50%</td></tr><tr><td>$500</td><td>20%</td></tr></tbody></table>

**Rare**

<table id="bkmrk-r%C3%A9compense-chance-di-1"><thead><tr><th>Récompense</th><th>Chance</th></tr></thead><tbody><tr><td>Diamond ×5</td><td>40%</td></tr><tr><td>Emerald ×10</td><td>35%</td></tr><tr><td>$2 500</td><td>25%</td></tr></tbody></table>

**Epic**

<table id="bkmrk-r%C3%A9compense-chance-di-2"><thead><tr><th>Récompense</th><th>Chance</th></tr></thead><tbody><tr><td>Diamond Block ×3</td><td>35%</td></tr><tr><td>Emerald Block ×5</td><td>30%</td></tr><tr><td>$10 000</td><td>25%</td></tr><tr><td>Legendary Sword</td><td>10%</td></tr></tbody></table>

**Legendary**

<table id="bkmrk-r%C3%A9compense-chance-di-3"><thead><tr><th>Récompense</th><th>Chance</th></tr></thead><tbody><tr><td>Diamond Block ×10</td><td>30%</td></tr><tr><td>$50 000</td><td>35%</td></tr><tr><td>$100 000</td><td>20%</td></tr><tr><td>Legendary Helmet</td><td>15%</td></tr></tbody></table>

> ℹ️ Les récompenses peuvent être des **items Minecraft** (`item` + `amount`) ou des **commandes** (`command: "eco give %player% X"`). Les chances doivent **totaliser 100%** par lootbag.

---

## Masques / Masks

**FR** — Les masques (behavior `mask`) sont des items de type `SKULL_ITEM` portés dans le **slot casque**. Ils accordent des multiplicateurs d'argent et d'XP Jobs.  
**EN** — Masks (`mask` behavior) are `SKULL_ITEM` items worn in the **helmet slot**. They grant money and Jobs XP multipliers.

<table id="bkmrk-cl%C3%A9-items.yml-nom-af-1"><thead><tr><th>Clé `items.yml`</th><th>Nom affiché</th><th>Rareté</th><th>Multiplicateur Argent</th><th>Multiplicateur Jobs XP</th></tr></thead><tbody><tr><td>`money_mask`</td><td>Money Mask</td><td>RARE</td><td>x1.5 (+50%)</td><td>x1.0</td></tr><tr><td>`jobs_mask`</td><td>Jobs Mask</td><td>RARE</td><td>x1.0</td><td>x1.5 (+50%)</td></tr><tr><td>`ultimate_mask`</td><td>Ultimate Mask</td><td>EPIC</td><td>x2.0 (+100%)</td><td>x2.0 (+100%)</td></tr></tbody></table>

> ⚠️ Le multiplicateur Jobs XP nécessite le plugin **Jobs**. Sans Jobs, seul le multiplicateur argent fonctionne.  
> The Jobs XP multiplier requires the **Jobs** plugin. Without it, only the money multiplier works.

---

## Hache de Ferme Évolutive / Upgradable Farm Axe

**FR** — Système à **4 niveaux** (behavior `upgradable_farm_axe`). Chaque niveau se débloque en minant/récoltant suffisamment de blocs. Déblocage des fonctionnalités progressif.  
**EN** — **4-level** system (`upgradable_farm_axe` behavior). Each level unlocks by mining/harvesting enough blocks. Features unlock progressively.

<table id="bkmrk-niveau-cl%C3%A9-items.yml"><thead><tr><th>Niveau</th><th>Clé `items.yml`</th><th>Tree Feller</th><th>Auto-Replant Cacao</th><th>Multiplicateur</th><th>Auto-Sell</th><th>Max taille arbre</th></tr></thead><tbody><tr><td>Lvl 1</td><td>`upgradable_farm_axe_1`</td><td>✘</td><td>✘</td><td>x1</td><td>✘</td><td>100 blocs</td></tr><tr><td>Lvl 2</td><td>`upgradable_farm_axe_2`</td><td>✔ (Shift+RC)</td><td>✘</td><td>x1</td><td>✘</td><td>150 blocs</td></tr><tr><td>Lvl 3</td><td>`upgradable_farm_axe_3`</td><td>✔ (Shift+RC)</td><td>✔</td><td>x2</td><td>✘</td><td>200 blocs</td></tr><tr><td>MAX</td><td>`upgradable_farm_axe_max`</td><td>✔ (Shift+RC)</td><td>✔</td><td>x3</td><td>✔</td><td>300 blocs</td></tr></tbody></table>

### Conditions d'upgrade / Upgrade conditions

<table id="bkmrk-upgrade-logs-n%C3%A9cessa"><thead><tr><th>Upgrade</th><th>Logs nécessaires</th><th>Cacao nécessaire</th></tr></thead><tbody><tr><td>Lvl 1 → Lvl 2</td><td>5 000</td><td>2 500</td></tr><tr><td>Lvl 2 → Lvl 3</td><td>15 000</td><td>7 500</td></tr><tr><td>Lvl 3 → MAX</td><td>50 000</td><td>25 000</td></tr></tbody></table>

### Stats affichées / Displayed stats

```
{log_count}   — rondins coupés / logs cut
{cocoa_count} — cacao récolté / cocoa harvested

```

> ℹ️ **Tree Feller** se toggle avec **Shift + Clic droit**. Il coupe l'arbre entier automatiquement jusqu'à la taille maximum du niveau.

---

## Boss Eggs

**FR** — Les boss eggs (behavior `boss_egg`) permettent de **spawner un boss personnalisé** en faisant clic droit sur un bloc. Le boss est entièrement configurable dans `items.yml`.  
**EN** — Boss eggs (`boss_egg` behavior) **spawn a custom boss** on right-click on a block. The boss is fully configurable in `items.yml`.

### Exemple de configuration / Example config

```yaml
boss_egg_1:
  type: EGG
  behavior: boss_egg
  boss:
    type: GIANT           # Type d'entité Minecraft
    name: "BOSS LV1"      # Nom affiché au-dessus du boss
    health: 500           # Points de vie
    effects:
      SPEED: 2            # Amplificateur (niveau = valeur - 1)
      INCREASE_DAMAGE: 4
    equipment:
      helmet:
        type: DIAMOND_HELMET
        enchants:
          DURABILITY: 5
      # chestplate, leggings, boots, sword...
    mode: FINAL_DAMAGE    # FINAL_DAMAGE ou BEST_DAMAGER
    loots:
      - "eco give %winner% 10000"

```

### Modes de victoire / Win modes

<table id="bkmrk-mode-condition-de-vi"><thead><tr><th>Mode</th><th>Condition de victoire FR</th><th>Win condition EN</th></tr></thead><tbody><tr><td>`FINAL_DAMAGE`</td><td>Le joueur qui donne le **dernier coup** gagne</td><td>The player who deals the **last hit** wins</td></tr><tr><td>`BEST_DAMAGER`</td><td>Le joueur ayant infligé le **plus de dégâts totaux** gagne</td><td>The player who dealt the **most total damage** wins</td></tr></tbody></table>

> Les commandes `loots` sont exécutées avec `%winner%` remplacé par le nom du gagnant.  
> `loots` commands are executed with `%winner%` replaced by the winner's name.

# TItems — Configuration

#  

## config.yml

```yaml
float-format: '%.2f'

```

Définit le format d'affichage des nombres décimaux (ex: prix d'une vente).  
`%.2f` = 2 décimales (ex: `1234.56`). / Defines the decimal display format (e.g. sale prices). `%.2f` = 2 decimal places.

---

## lang.yml — Référence complète / Full Reference

### Section `items`

<table id="bkmrk-cl%C3%A9-%2F-key-descriptio"><thead><tr><th>Clé / Key</th><th>Description FR</th><th>Description EN</th></tr></thead><tbody><tr><td>`items.give.usage`</td><td>Syntaxe de la commande</td><td>Command syntax</td></tr><tr><td>`items.give.player-not-found`</td><td>Joueur introuvable (`%name%`)</td><td>Player not found</td></tr><tr><td>`items.give.no-item`</td><td>Item inexistant (`%name%`)</td><td>Item doesn't exist</td></tr><tr><td>`items.give.invalid-item`</td><td>Item mal configuré (`%name%`)</td><td>Misconfigured item</td></tr><tr><td>`items.give.invalid-amount`</td><td>Quantité invalide</td><td>Invalid amount</td></tr><tr><td>`items.give.success`</td><td>Don réussi (`%player%`, `%item%`, `%amount%`)</td><td>Successful give</td></tr><tr><td>`items.scepter.not-combat`</td><td>Sceptre hors combat</td><td>Scepter outside combat</td></tr><tr><td>`items.scepter.cooldown`</td><td>Sceptre en cooldown (`%time%`)</td><td>Scepter on cooldown</td></tr><tr><td>`items.scepter.teleport-delay`</td><td>Délai téléportation (`%time%`)</td><td>Teleport delay</td></tr></tbody></table>

### Section `listeners`

<table id="bkmrk-cl%C3%A9-%2F-key-descriptio-1"><thead><tr><th>Clé / Key</th><th>Description</th></tr></thead><tbody><tr><td>`listeners.entity-killed`</td><td>Argent gagné sur kill mob (`%money%`)</td></tr><tr><td>`listeners.harvested`</td><td>Vente de récolte (`%money%`)</td></tr><tr><td>`listeners.placer-dont`</td><td>Builder utilisé dans zone interdite</td></tr><tr><td>`listeners.sell-stick.success`</td><td>Vente sell stick réussie (`%money%`)</td></tr><tr><td>`listeners.sell-stick.cannot-access`</td><td>Coffre inaccessible</td></tr><tr><td>`listeners.lootbag.opened`</td><td>Lootbag ouvert (`%tier%`, `%reward%`)</td></tr><tr><td>`listeners.lootbag.inventory-full`</td><td>Inventaire plein, item dropped</td></tr><tr><td>`listeners.farm-axe.tree-feller-enabled`</td><td>Tree Feller activé</td></tr><tr><td>`listeners.farm-axe.tree-feller-disabled`</td><td>Tree Feller désactivé</td></tr><tr><td>`listeners.farm-axe.upgraded`</td><td>Hache upgradée (`%level%`)</td></tr><tr><td>`listeners.mask.equipped`</td><td>Masque équipé (`%mask%`)</td></tr><tr><td>`listeners.boss.spawned`</td><td>Boss spawné</td></tr><tr><td>`listeners.boss.killed`</td><td>Boss tué (`%winner%`)</td></tr><tr><td>`listeners.boss.base-name`</td><td>Placeholder nom vide (leaderboard boss)</td></tr><tr><td>`listeners.boss.base-value`</td><td>Placeholder valeur vide (leaderboard boss)</td></tr></tbody></table>

### Section `reload`

<table id="bkmrk-cl%C3%A9-%2F-key-descriptio-2"><thead><tr><th>Clé / Key</th><th>Description</th></tr></thead><tbody><tr><td>`reload.success`</td><td>Rechargement réussi</td></tr><tr><td>`reload.error`</td><td>Erreur lors du rechargement</td></tr></tbody></table>

---

## items.yml — Structure des items

### Item standard (armor, basic)

```yaml
items:
  farm:
    effects:
      - type: FAST_DIGGING
        amplifier: 1
      - type: SPEED
        amplifier: 1
      - type: FIRE_RESISTANCE
    helmet:
      type: IRON_HELMET
      damage: 0
      display-name: '&e&lFarming Helmet'
      lore:
        - '&7Ligne de lore'

```

### Item custom — Propriétés communes

```yaml
custom-items:
  mon_item:
    type: DIAMOND_SWORD       # Type de matériau Minecraft (obligatoire)
    behavior: god_dager       # Behavior (obligatoire, voir liste ci-dessous)
    damage: 0                 # Dommage initial (durabilité utilisée)
    unbreakable: true         # Rend l'item indestructible
    can-drop: false           # Empêche le drop manuel
    drop-on-death: false      # Empêche le drop à la mort
    display-name: '&eNom'     # Nom coloré (codes & supportés)
    flags:
      - HIDE_ENCHANTS         # Masque les enchantements dans le lore
    lore:
      - '&7Ligne 1'
      - '&7Ligne 2'
    enchants:
      DAMAGE_ALL: 5
      FIRE_ASPECT: 1
      DURABILITY: 4

```

### Propriétés spécifiques par behavior

**`placer`**

```yaml
place:
  type: OBSIDIAN
  data: 0
period: 15       # Ticks entre chaque pose
max-uses: 30
face: block      # Face du bloc cliqué

```

**`sell_stick`**

```yaml
max-uses: 235
multiplier: 1.5

```

**`lootbag`**

```yaml
tier: common
sound: LEVEL_UP
effect: HAPPY_VILLAGER
loots:
  1:
    item: DIAMOND         # OU command: "eco give %player% 500"
    amount: 1
    chance: 30
    name: '&bDiamond'

```

**`mask`**

```yaml
mask-name: 'Money Mask'
money-multiplier: 1.5
jobs-multiplier: 1.0

```

**`harvester`**

```yaml
range: 0
multiplier: 2
auto-sell: false
upgrade:
  farms:
    CROPS: 10000
    NETHER_WARTS: 10000
    CARROT: 10000
  item: harvester_2     # Clé de l'item vers lequel upgrader

```

**`upgradable_farm_axe`**

```yaml
tree-feller: true
auto-replant-cocoa: true
multiplier: 2
auto-sell: false
max-tree-size: 200
upgrade:
  farms:
    LOG: 50000
    COCOA: 25000
  item: upgradable_farm_axe_max

```

**`boss_egg`**

```yaml
boss:
  type: GIANT
  name: "BOSS LV1"
  health: 500
  effects:
    SPEED: 2
    INCREASE_DAMAGE: 4
  equipment:
    helmet:
      type: DIAMOND_HELMET
      enchants:
        DURABILITY: 5
  mode: FINAL_DAMAGE   # ou BEST_DAMAGER
  loots:
    - "eco give %winner% 10000"

```

---

## Liste de tous les behaviors / Full Behavior List

<table id="bkmrk-behavior-item%28s%29-ass"><thead><tr><th>Behavior</th><th>Item(s) associé(s)</th></tr></thead><tbody><tr><td>`basic`</td><td>god\_chestplate, god\_rod (item lié sans logique custom)</td></tr><tr><td>`hammer`</td><td>hammer3</td></tr><tr><td>`orbe`</td><td>orbe\_fire, orbe\_speed, orbe\_force, orbe\_haste, orbe\_magique</td></tr><tr><td>`farm_armor`</td><td>Armure de ferme (set)</td></tr><tr><td>`god_dager`</td><td>god\_dager</td></tr><tr><td>`god_bow`</td><td>god\_bow</td></tr><tr><td>`scepter`</td><td>scepter</td></tr><tr><td>`placer`</td><td>obsi, iron, sand, dirt, soul\_sand, lava</td></tr><tr><td>`sell_stick`</td><td>sell\_stick, sell\_stick3, sell\_stick4</td></tr><tr><td>`harvester`</td><td>harvester\_1, harvester\_2</td></tr><tr><td>`hook`</td><td>hook</td></tr><tr><td>`potioncounter`</td><td>potioncounter</td></tr><tr><td>`armorcounter`</td><td>armorcounter</td></tr><tr><td>`multitool`</td><td>farm\_axe</td></tr><tr><td>`farming_sword`</td><td>farming\_sword\_1, farming\_sword\_2</td></tr><tr><td>`exp_pickaxe`</td><td>exp\_pickaxe</td></tr><tr><td>`boss_egg`</td><td>boss\_egg\_1</td></tr><tr><td>`lootbag`</td><td>lootbag\_common, lootbag\_rare, lootbag\_epic, lootbag\_legendary</td></tr><tr><td>`mask`</td><td>money\_mask, jobs\_mask, ultimate\_mask</td></tr><tr><td>`upgradable_farm_axe`</td><td>upgradable\_farm\_axe\_1/2/3/max</td></tr></tbody></table>

# TItems — PlaceholderAPI & API Développeur / Developer API

#  

## PlaceholderAPI

**FR** — TItems expose des placeholders via PlaceholderAPI (identifiant : `tboss`). Ces placeholders fonctionnent dans un **rayon de 50 blocs** autour d'un boss actif.  
**EN** — TItems exposes placeholders via PlaceholderAPI (identifier: `tboss`). These placeholders work within a **50-block radius** of an active boss.

> ⚠️ Nécessite le plugin **PlaceholderAPI** installé. / Requires **PlaceholderAPI** installed.

### Placeholders disponibles / Available Placeholders

<table id="bkmrk-placeholder-descript"><thead><tr><th>Placeholder</th><th>Description FR</th><th>Description EN</th><th>Valeur si aucun boss</th></tr></thead><tbody><tr><td>`%tboss_near_boss%`</td><td>Boss dans les 50 blocs ?</td><td>Boss within 50 blocks?</td><td>`ERROR`</td></tr><tr><td>`%tboss_health%`</td><td>HP restants du boss proche</td><td>Nearby boss remaining HP</td><td>`ERROR`</td></tr><tr><td>`%tboss_type%`</td><td>Type du boss (`FINAL_DAMAGE`…)</td><td>Boss type</td><td>`ERROR`</td></tr><tr><td>`%tboss_lead_name_1%`</td><td>Nom du joueur #1 au classement dégâts</td><td>Player name at damage rank #1</td><td>`Nobody`</td></tr><tr><td>`%tboss_lead_name_2%`</td><td>Nom du joueur #2 au classement</td><td>Player name at damage rank #2</td><td>`Nobody`</td></tr><tr><td>`%tboss_lead_name_N%`</td><td>Nom du joueur #N</td><td>Player name at rank N</td><td>`Nobody`</td></tr><tr><td>`%tboss_lead_health_1%`</td><td>Dégâts infligés par le joueur #1</td><td>Damage dealt by player #1</td><td>`0`</td></tr><tr><td>`%tboss_lead_health_N%`</td><td>Dégâts infligés par le joueur #N</td><td>Damage dealt by player #N</td><td>`0`</td></tr></tbody></table>

### Usage exemple (scoreboard, HUD…)

```
Boss proche: %tboss_near_boss%
Vie restante: %tboss_health%
#1 - %tboss_lead_name_1% (%tboss_lead_health_1% dmg)
#2 - %tboss_lead_name_2% (%tboss_lead_health_2% dmg)

```

---

## API Développeur / Developer API

Le package d'API est `fr.totallycorp.titems.api.event`. Il expose des **Bukkit events personnalisés** que les plugins tiers peuvent écouter.  
The API package is `fr.totallycorp.titems.api.event`. It exposes **custom Bukkit events** that third-party plugins can listen to.

---

### HarvestEvent

Déclenché lors de la récolte d'une culture via les items TItems (Harvester).  
Fired when a crop is harvested via TItems items (Harvester).

**Méthodes / Methods :**

<table id="bkmrk-m%C3%A9thode-%2F-method-ret"><thead><tr><th>Méthode / Method</th><th>Retour / Return</th><th>Description</th></tr></thead><tbody><tr><td>`getPlayer()`</td><td>`Player`</td><td>Joueur qui récolte / Harvesting player</td></tr><tr><td>`getMaterial()`</td><td>`Material`</td><td>Type de culture récoltée / Harvested crop type</td></tr></tbody></table>

**Exemple / Example :**

```java
@EventHandler
public void onHarvest(HarvestEvent event) {
    Player player = event.getPlayer();
    Material crop = event.getMaterial();
    // votre logique / your logic
}

```

---

### InstantKillEvent *(Cancellable)*

Déclenché quand un monstre est tué en un coup par la Farming Sword. **Annulable.**  
Fired when a mob is one-shot by the Farming Sword. **Cancellable.**

**Méthodes / Methods :**

<table id="bkmrk-m%C3%A9thode-%2F-method-ret-1"><thead><tr><th>Méthode / Method</th><th>Retour / Return</th><th>Description</th></tr></thead><tbody><tr><td>`getKiller()`</td><td>`Player`</td><td>Joueur attaquant / Attacking player</td></tr><tr><td>`getEntity()`</td><td>`LivingEntity`</td><td>Entité tuée / Killed entity</td></tr><tr><td>`setCancelled(true)`</td><td>`void`</td><td>Annule le one-shot / Cancels the one-shot</td></tr></tbody></table>

**Exemple / Example :**

```java
@EventHandler
public void onInstantKill(InstantKillEvent event) {
    if (someCondition) {
        event.setCancelled(true);
    }
}

```

---

### PlayerDropOnDeathEvent

Déclenché à la mort d'un joueur pour gérer les drops d'items TItems. Permet de **forcer la conservation** d'un item spécifique.  
Fired on player death to manage TItems item drops. Allows **forcing item retention**.

**Méthodes / Methods :**

<table id="bkmrk-m%C3%A9thode-%2F-method-ret-2"><thead><tr><th>Méthode / Method</th><th>Retour / Return</th><th>Description</th></tr></thead><tbody><tr><td>`getPlayer()`</td><td>`Player`</td><td>Joueur décédé / Deceased player</td></tr><tr><td>`getDrops()`</td><td>`List<ItemStack>`</td><td>Items normaux droppés / Normal item drops</td></tr><tr><td>`getArmor()`</td><td>`List<ItemStack>`</td><td>Armures droppées / Armor drops</td></tr><tr><td>`getAllDrops()`</td><td>`List<ItemStack>`</td><td>Tous les drops combinés / All drops combined</td></tr><tr><td>`keepItem(ItemStack)`</td><td>`void`</td><td>Force la conservation d'un item / Forces item retention</td></tr><tr><td>`getKeep()`</td><td>`List<ItemStack>`</td><td>Liste des items conservés / Kept items list</td></tr></tbody></table>

**Exemple / Example :**

```java
@EventHandler
public void onDeath(PlayerDropOnDeathEvent event) {
    // Conserver tous les Nether Stars / Keep all Nether Stars
    event.getDrops().stream()
        .filter(item -> item.getType() == Material.NETHER_STAR)
        .forEach(event::keepItem);
}

```

---

### EventStartEvent / EventStopEvent

Événements génériques déclenchés au **démarrage** et à l'**arrêt** d'un event TItems (boss, etc.).  
Generic events fired on TItems event **start** and **stop**.

```java
@EventHandler
public void onEventStart(EventStartEvent event) { /* ... */ }

@EventHandler
public void onEventStop(EventStopEvent event) { /* ... */ }

```

---

## Accès aux Managers / Manager Access

Tous les managers sont accessibles via l'instance principale du plugin.  
All managers are accessible via the plugin's main instance.

<table id="bkmrk-manager-acc%C3%A8s-%2F-acce"><thead><tr><th>Manager</th><th>Accès / Access</th><th>Rôle FR</th><th>Role EN</th></tr></thead><tbody><tr><td>`BossManager`</td><td>`TItems.getInstance().getBossManager()`</td><td>Gère les boss actifs</td><td>Manages active bosses</td></tr><tr><td>`ScepterManager`</td><td>`TItems.getInstance().getScepterManager()`</td><td>Gère les PvP sceptre</td><td>Manages scepter PvP</td></tr><tr><td>`MaskManager`</td><td>`TItems.getInstance().getMaskManager()`</td><td>Gère les masques équipés</td><td>Manages equipped masks</td></tr><tr><td>`SellItemsManager`</td><td>`TItems.getInstance().getSellItemsManager()`</td><td>Gère la vente d'items</td><td>Manages item selling</td></tr></tbody></table>

### Exemple — Vérifier si un boss est à proximité

```java
BossManager bm = TItems.getInstance().getBossManager();

boolean isBossNearby = bm.getBossMap().values().stream()
    .anyMatch(boss -> boss.getLoc().distance(player.getLocation()) <= 50);

```

### Exemple — Récupérer le classement dégâts d'un boss

```java
for (Boss boss : bm.getBossMap().values()) {
    HashMap<UUID, Double> damages = boss.getPlayerDamage();
    // trier et afficher / sort and display
}

```