Get Nexal Backpacks on the Nexal Studios store
Add a Backpack Type
This adds a Fishing Backpack: 27 slots, only fish, picks up its catch on its own, crafted from string, a fishing rod and a chest.
1. Add the type
Open plugins/NexalBackpacks/config.yml and add a block under types:, at the same indentation
as the other types:
types:
# ... the types already there ...
fishing:
display-name: "<aqua><bold>Fishing Backpack</bold></aqua>"
material: TROPICAL_FISH_BUCKET
lore:
- "<gray>Holds what you catch</gray>"
- "<gray>Capacity:</gray> <white>%slots% slots</white>"
- ""
- "<yellow>Right-click to open</yellow>"
slots: 27
soulbound: false
auto-pickup-default: true
whitelist:
- COD
- SALMON
- TROPICAL_FISH
- PUFFERFISH
blacklist: []
recipe:
enabled: true
type: shaped
shape:
- "SRS"
- "SCS"
- "SSS"
ingredients:
S: STRING
R: FISHING_ROD
C: CHEST
The quickest way to start is to copy a type that is close to what you want (farming here) and
change it. Every key is explained in Backpack types explained.
2. Give it a menu (optional)
Without a gui section the type gets the default menu. To give it its own colours, add one:
gui:
title: "<gradient:#3498DB:#85C1E9><bold>Fishing Backpack</bold></gradient>"
rows: auto
filler:
material: LIGHT_BLUE_STAINED_GLASS_PANE
buttons:
auto-pickup:
material: TROPICAL_FISH
material-off: BONE
Design a backpack menu shows what else the menu can do.
3. Save and check
- Save
config.yml. Withauto-reload: trueit loads at once; otherwise run/backpack admin reload. - Look at the console. Failed to load backpack type 'fishing' means a wrong
material. - Run
/backpack admin types.fishingshould be in the list with 27 slots.
4. Try it
/backpack admin give <your name> fishing.- Right-click it: the menu opens with its own title.
- Put a fish in, then a stone: the stone is refused.
- Go fishing: the catch goes into the backpack.
- Craft one at a crafting table with the recipe above.
Common mistakes
| Problem | Fix |
|---|---|
The type is not in /backpack admin types | The YAML is broken (check the indentation: two spaces, no tabs) or material is wrong. The console says which |
| Items you listed are refused | A misspelled name in whitelist is skipped without a warning. Use the exact material name |
| The recipe does nothing | recipe.enabled is not true, or a letter in shape has no entry in ingredients |
| Players cannot craft it while holding shift | On purpose: backpacks are crafted one at a time |