Kits
Necessities features a fully data-driven Kit system. Kits are collections of items that players can claim using the /kit command.
Using Kits
- List Kits:
/kit - Claim Kit:
/kit <name> - Permission:
necessities.command.kit - Bypass Cooldown:
necessities.command.kit.bypass_cooldown
Creating Kits
Kits are defined via JSON files. You can add them in two ways:
- Global Config: Inside
config/necessities/kits/. - Datapacks: Inside
data/<namespace>/necessities/kits/.
File Structure
Create a file named kitname.json. The filename becomes the kit name.
config/necessities/kits/starter.json
{
"cooldown": 3600,
"items": [
{
"id": "minecraft:stone_sword",
"count": 1
},
{
"id": "minecraft:bread",
"count": 16
},
{
"id": "minecraft:leather_helmet",
"count": 1
}
]
}
Parameters
| Key | Type | Description |
|---|---|---|
cooldown | Long | The time in seconds the player must wait before claiming the kit again. Set to 0 for no cooldown. |
items | List | A list of item objects to give to the player. |
Item Object
The item object follows the standard Minecraft format (similar to recipes or loot tables).
{
"id": "minecraft:diamond_sword",
"count": 1,
"components": {
"minecraft:enchantments": {
"levels": {
"minecraft:sharpness": 5
}
}
}
}