Skip to main content

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:

PermissionLets a playerDefault
nexalbackpacks.listUse /backpack listeveryone
nexalbackpacks.autopickupUse /backpack autopickupeveryone
nexalbackpacks.notificationsTurn their pickup messages on and offeveryone
nexalbackpacks.adminEvery admin command and the admin GUIop

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.

SectionWhat you do there
ConfigurationTurn batched pickup messages on or off for the server, and set how long a batch waits
Backpack TypesLeft-click a type to get one. Right-click to change its slots, soulbound, auto-pickup on new backpacks, and whether its recipe works
Lost BackpacksSee destroyed backpacks, preview their contents and give them back
Reload, Export, ImportThe 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 changeExisting backpacks
slots, largerGet the extra slots
slots, smallerShow 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, blacklistApply to what goes in from now on. Items already inside stay
soulbound, guiApply at once
display-name, material, lore, custom-model-data, skullOnly backpacks made from now on. Existing items keep the look they were made with
auto-pickup-defaultOnly backpacks made from now on. Players switch it per backpack
recipeCrafting 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.json while the server is stopped, or run /backpack admin export and keep export.json.
  • SQL: back up the two tables with your usual database backups, or use /backpack admin export.

Moving between JSON and SQL​

  1. Run /backpack admin export. This writes every backpack and player preference to plugins/NexalBackpacks/export.json.
  2. Change storage.type in config.yml (and fill in storage.sql when moving to SQL).
  3. Restart the server.
  4. 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 seeWhy, and what to do
Backpack data not foundThe 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 openAnother player (or a copy of the same item) has it open. It frees up when they close it
An item will not go inThe 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 hereOn 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 nothingReopen 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 menuTwo buttons share a slot and one was hidden. The console names it. See Design a backpack menu