Get Nexal Backpacks on the Nexal Studios store
Admin Manual
Running Nexal Backpacks day to day: who can do what, the admin GUI, editing the configuration, storage and backups, and what to do when something looks wrong.
Permissions
Players can open, craft and use backpacks without any permission. The player commands each have one, given to everybody by default:
| Permission | Lets a player | Default |
|---|---|---|
nexalbackpacks.list | Use /backpack list | everyone |
nexalbackpacks.autopickup | Use /backpack autopickup | everyone |
nexalbackpacks.notifications | Turn their pickup messages on and off | everyone |
nexalbackpacks.admin | Every admin command and the admin GUI | op |
To take a command away from a group, set its permission to false in your permissions plugin, for
example with LuckPerms: /lp group default permission set nexalbackpacks.list false.
The admin GUI
/backpack admin opens a hub. From the console, the same command lists the admin commands.
| Section | What you do there |
|---|---|
| Configuration | Turn batched pickup messages on or off for the server, and set how long a batch waits |
| Backpack Types | Left-click a type to get one. Right-click to change its slots, soulbound, auto-pickup on new backpacks, and whether its recipe works |
| Lost Backpacks | See destroyed backpacks, preview their contents and give them back |
| Reload, Export, Import | The same as the commands below |
What you change in the GUI is written to config.yml and applies at once. A type's name,
material, lore, item filters, recipe shape and menu look are edited in config.yml.
Giving backpacks
/backpack admin give <player> <type>
The player needs a free inventory slot. Each backpack you give is a new, empty one.
/backpack admin types lists the type names.
Editing config.yml
With auto-reload: true (the default), changes to config.yml and messages.yml apply as soon
as you save the file. With auto-reload: false, run /backpack admin reload after editing.
A menu that is already open keeps its old look until it is opened again.
Check the console after an edit. A mistake in a menu setting (an unknown icon, a slot out of
range) is reported there and that one setting falls back to its default. An unknown material
for the backpack itself is worse: the whole type does not load (Failed to load backpack type)
until it is fixed. A misspelled material in whitelist, blacklist or a recipe is skipped
without a warning.
What changes for backpacks players already have:
| You change | Existing backpacks |
|---|---|
slots, larger | Get the extra slots |
slots, smaller | Show fewer slots. Items in the slots that disappear are kept on the server, hidden, and come back if you make the type larger again |
whitelist, blacklist | Apply to what goes in from now on. Items already inside stay |
soulbound, gui | Apply at once |
display-name, material, lore, custom-model-data, skull | Only backpacks made from now on. Existing items keep the look they were made with |
auto-pickup-default | Only backpacks made from now on. Players switch it per backpack |
recipe | Crafting from now on |
Never delete or rename a type that players have backpacks of. Their backpacks point to the
type by its name. To stop new ones from being made, set recipe.enabled: false and stop giving
it out.
More on each setting: Backpack types explained.
Lost backpacks
A backpack item destroyed by lava, fire, cactus, an explosion or the void, or one that despawns on the ground, is marked as lost. Its contents stay on the server.
In the admin GUI, Lost Backpacks lists them with the reason and the time. Right-click one to see what is inside. Left-click to take it: you get a new backpack item, linked to the same contents, to hand back to its owner. You need a free inventory slot.
A dropped backpack is only marked as lost once the item is actually destroyed, so one lying on the ground or picked up by another player is not in the list.
/backpack admin cleanup deletes every lost backpack and its contents for good. It only runs
from the console, and there is no undo.
Storage
The backpacks live in plugins/NexalBackpacks/data.json (JSON), or in the backpacks and
backpacks_users tables (SQL). The item a player holds only carries the backpack's ID.
Backups
- JSON: copy
data.jsonwhile the server is stopped, or run/backpack admin exportand keepexport.json. - SQL: back up the two tables with your usual database backups, or use
/backpack admin export.
Moving between JSON and SQL
- Run
/backpack admin export. This writes every backpack and player preference toplugins/NexalBackpacks/export.json. - Change
storage.typeinconfig.yml(and fill instorage.sqlwhen moving to SQL). - Restart the server.
- Run
/backpack admin import.
The import adds what the new storage does not have yet, and leaves records that already exist as they are. The same steps move backpacks to another server.
Placeholders
With PlaceholderAPI installed, the plugin adds placeholders for how many backpacks a player
carries, how many items are in them, and how full they are, in total and per type: for example
%backpacks_count% or %backpacks_fill_percentage%. The full list is on the
Placeholders page.
Messages
Every chat message, sound and menu text is in messages.yml, in MiniMessage format. The top of
the file lists the colors used, so a theme can be changed with find and replace. Remove a key
and the plugin uses the default text for it. The whole file, with every key, is on the
messages.yml page. A type can also set its own button text in its
gui section: see Design a backpack menu.
Troubleshooting
| What you see | Why, and what to do |
|---|---|
| Backpack data not found | The item's ID has no stored backpack. Usually storage was switched without an import, or data.json was replaced. Restore the data, or run the import |
| Someone else has this backpack open | Another player (or a copy of the same item) has it open. It frees up when they close it |
| An item will not go in | The type's whitelist or blacklist refuses it, or it is a backpack, or a shulker box or bundle holding one |
| A backpack cannot go in here | On purpose: a backpack never goes into a crafting grid, furnace, anvil or other workstation, where it would be used up with its contents |
| A config change does nothing | Reopen the backpack. With auto-reload: false, run /backpack admin reload first. Check the console for a warning about the setting |
| A button is missing from a menu | Two buttons share a slot and one was hidden. The console names it. See Design a backpack menu |