# About Loadouts & Supplies

**Loadout** is a saved (serialized) player inventory. Loadouts are personal for each team. When a player joins a team, they will receive items from the loadout you created, while the old player inventory will be preserved.

Depending on the **`KEEP_INVENTORY`** preference setting, after each death on the battleground, the player's inventory will either be **overwritten** with the default loadout inventory, or **saved** in the current state, i.e. with all mined blocks, crafted tools, etc.

You can create an infinite number of loadouts. At the moment, players cannot choose a loadout yourself, but this feature will be implemented in the future. If a team has more than one loadout, then when a player connects to it, a **random** loadout will be picked.

### Automatic Item Replenishment or Supplies

**Supply** is an auto-replenishment task for a specific item. Supplies are bound to loadouts. A small example: you have _Archer_ and _Swordsman_ loadouts. Both have supplies, but _Archer_ gets _arrows_ and _Swordsman_ gets _healing potions_. This is a very flexibly customizable mechanism, more on that below.

### How To: A New Supply

`/ms add supply <name> <interval> <amount> <maximum> <permission>`

* **\<name>** is a supply name, you can name it as you wish.
* **\<interval>** is an amount of ticks between each item replenish.
* **\<amount>** is the amount of the replenish item.
* **\<maximum>** is a maximum amount if replenished item.
* **\<permission>** is a required permission, if you doesn't have it, you won't recieve anything. All players have the `minespades.player` permission by default, so if you want the supply to be available to everyone, then use this permission. But really you can use any.

This command will create a new **supply** for the selected loadout. The **item that is in your hand** at the time the command is executed will be used as a replenished item. Because of smart **ItemStack** serialization, all NBT data will be saved, i.e. custom items are supported.
