Get Nexal Backpacks on the Nexal Studios store
Backpack Types Explained
A type is a kind of backpack: what the item looks like, how much it holds, what it accepts,
how it is crafted and what its menu looks like. Every backpack a player owns is one of the types
under types: in config.yml.
types:
small: # the type's name, used in commands and stored with every backpack
display-name: "<green>Small Backpack</green>"
material: LEATHER
slots: 9
# ...
The name under types: (here small) is what /backpack admin give <player> small uses and what
every backpack of that type is linked to. Keep it short and lowercase, and do not rename it once
players have backpacks of it.
How a backpack is stored
A backpack item carries only an ID. Its contents are on the server, under that ID, together with its type and whether auto-pickup is on. So:
- copying the item opens the same backpack, it never doubles the items inside;
- changes to the type in
config.ymlreach backpacks that already exist (see the table in the Admin Manual for which ones do).
The item
| Key | Meaning |
|---|---|
display-name | The item's name, in MiniMessage (<green>, <gradient:...>, <bold>) |
material | The item, as a material name such as LEATHER or ENDER_CHEST. A wrong name stops the type from loading |
lore | Lines under the name. %slots% shows the capacity |
custom-model-data | A number for a resource pack model. 0 or left out for none |
skull | With material: PLAYER_HEAD: the head's skin, as the base64 "Value" from a head site, a https://textures.minecraft.net/texture/... URL, or a player name |
Whatever the material, the backpack cannot be placed or used as that item: right-clicking it
always opens the backpack. An ENDER_EYE backpack is never thrown, a DIAMOND_PICKAXE one
never mines. Nor is it ever used up as that item: it stays out of crafting grids, furnaces,
anvils and other workstations, hoppers and dispensers leave it alone, and animals and mobs do
not eat or pick it up. So any material is safe, even one that is fuel or food.
For a head, prefer a texture value or URL: a player name shows that player's current skin, which changes when they change it.
Size
| Key | Meaning |
|---|---|
slots | How many item stacks it holds, 1 to 540 |
The menu shows as many slots as fit on a page (45 with the default six rows and one row of buttons). A bigger backpack gets more pages with arrows. A backpack whose size does not fill its last page shows locked slots there.
What it accepts
| Key | Meaning |
|---|---|
whitelist | If not empty, only these materials go in |
blacklist | These materials never go in |
Both are lists of material names. With an empty whitelist, everything goes in except the blacklist. Both lists apply to every way in: clicking, dragging, shift-clicking, number keys, Quick Deposit and auto-pickup.
whitelist: # a fishing backpack
- COD
- SALMON
- TROPICAL_FISH
- PUFFERFISH
blacklist: []
Backpacks never go into a backpack, and neither do shulker boxes or bundles that hold one, whatever the lists say.
Behaviour
| Key | Meaning |
|---|---|
soulbound | true: the backpack stays in the player's inventory when they die |
auto-pickup-default | true: a new backpack of this type starts with auto-pickup on. Players can switch it per backpack |
Auto-pickup with a whitelist makes a backpack that sorts the loot by itself: a mining backpack collects ores and stone while the rest goes to the inventory.
Recipe
recipe:
enabled: true
type: shaped # or shapeless
shape: # shaped only: three rows of up to three letters, space for empty
- "LLL"
- "LCL"
- "LLL"
ingredients: # each letter and its material
L: LEATHER
C: CHEST
For a shapeless recipe, leave out shape: each entry under ingredients is one item, in any
position. Use two letters for two of the same material.
enabled: false (or no recipe at all) means the type can only be given by an admin. Every
crafted backpack, from a crafting table or a crafter, is a new backpack with its own storage.
Menu
The optional gui section sets this type's menu: title, rows, colours, and where each button
is. Anything left out keeps the default. Design a backpack menu covers it.
Next
Add a backpack type puts all of this together.