ModularPacks is a Paper plugin that adds physical backpacks (items you carry and interact with) and installable upgrades/modules that extend what a backpack can do.
I originally wrote this because “PlayerVault-style” plugins felt boring: same concept, usually accessed via commands. I wanted a real item with a GUI that you can open, upgrade, and carry around. The Sophisticated Backpacks mod was a heavy inspiration — this is a server-side take so anyone can use it on a vanilla client (a resource pack is only needed for nicer visuals like custom models/textures).
- Paper
1.21.10+(pluginapi-version: 1.21) - Java
21
- Put the jar in
plugins/ - Start the server once to generate:
plugins/ModularPacks/config.ymlplugins/ModularPacks/lang/en_us.ymlplugins/ModularPacks/backpacks.db(SQLite; created on first use)
- Configure
config.yml/lang/en_us.yml - Restart (or run
/backpack reload)
- A backpack item stores two important PersistentDataContainer values:
backpack_id(UUID): the identity of the backpackbackpack_type(tier/type id): e.g.Leather,Iron,Netherite
- All contents and installed modules are persisted in SQLite (
plugins/ModularPacks/backpacks.db) under thatbackpack_id. - Backpacks can have upgrade slots (configured per type). Upgrades are items you install into those slots.
- To avoid dupes and “stale views”:
- Backpack sessions lock to the current viewer while the backpack (or a module screen) is open.
- Sorting-mod click spam is rate-limited/blocked inside ModularPacks menus.
- Linked backpacks (multiple items pointing at the same
backpack_id) refresh when changes are saved.
- Obtain a backpack (craft it, or
/backpack give type <typeId>). - Right-click the backpack item to open it.
- Put upgrades into the upgrade slots.
- Module interaction is shown in the module’s lore (see
lang/en_us.ymlkeys likemoduleActions*).
Upgrades are defined in config.yml under Upgrades:. Each upgrade can be:
Toggleable: true/false(Shift + Left-click in the backpack GUI toggles it)SecondaryAction: true/false(Right-click in the backpack GUI performs a module-specific action)ScreenType:(opens a module screen likeDropper,Crafting,Anvil, etc.)
Included upgrades (see config.yml for exact settings):
- Utility:
Everlasting,Magnet,Tank,Feeding,Void - Workstations:
Crafting,Smelting,Blasting,Smoking,Stonecutter,Anvil,Smithing,Jukebox
Notes:
- The
Jukeboxupgrade stores real music discs (not ghost items). Only discs physically in its module inventory can play. - The
Voidupgrade is intentionally safer: it logs full item bytes in the DB so accidental voids can be recovered.
Base command: /backpack
Permissions (see src/main/resources/plugin.yml):
modularpacks.command(required to use/backpack; defaultop)modularpacks.admin(admin tools; defaultop)modularpacks.reload(reload; defaultop)
Subcommands:
- Give items:
/backpack give type <typeId> [player] [amount]/backpack give module <upgradeId> [player] [amount]
- List backpacks from the DB (works for offline players if the server has their UUID cached):
/backpack list <playerName>/backpack list unowned
- Open a backpack by DB identity (admin):
/backpack open <uuid>/backpack open <player> <Type#N>(example:Netherite#1)
- Change the tier/type of the backpack in your main hand (admin):
/backpack settype <typeId> [--force]
- Reload config/lang/recipes:
/backpack reload
- Recovery (admin):
/backpack recover backpack <player> <backpackUuid>/backpack recover void <player|uuid> list [limit] [all]/backpack recover void <player|uuid> <id|latest> [receiver]
Main config file: plugins/ModularPacks/config.yml
Under modularpacks: you can configure:
ResizeGUI: dynamically size pages vs fixed sizeAutoCloseOnTeleportDebug.ClickLog: logs click/drag events toplugins/ModularPacks/click-events.log(useful for debugging sorting mods)AllowShulkerBoxes,AllowBundles: block/allow these container types inside backpacksBackpackInsertBlacklist: block specificMaterialtypes from being inserted (the Magnet module respects this)- GUI materials (nav buttons, borders, etc.)
Backpack tiers are defined under BackpackTypes: (example ids: Leather, Copper, Iron, Gold, Diamond, Netherite).
Each type defines:
Rows: storage rows (Rows * 9slots)UpgradeSlotsCraftingRecipe(eitherCraftingorSmithing)- Item appearance (
DisplayName,Lore,CustomModelData,SkullData, etc.)
CraftingRecipe supports multiple alternatives using a list-of-maps format (see the Iron example in config.yml).
Recipe ingredient values support vanilla materials and ModularPacks tokens:
BACKPACK:<TypeId>(example:BACKPACK:Leather)MODULE:<UpgradeId>/UPGRADE:<UpgradeId>(example:UPGRADE:Magnet)
Language file: plugins/ModularPacks/lang/en_us.yml
You can use placeholders in names/lore with {placeholderName}.
Common placeholders:
- Backpack item lore:
{backpackContents}(usesbackpackContents/backpackContentsEmpty){backpackId}{installedModules}
- Module lore:
{moduleActions}and module-specific variants fromlang/en_us.yml(Feeding/Tank/Jukebox, etc.){toggleState}(usestoggleState.enabled/toggleState.disabled){magnetRange}{containedFluid}/{containedExp}(Tank){jukeboxMode}(Jukebox)
- Database file:
plugins/ModularPacks/backpacks.db - Tables:
backpacks(metadata + contents bytes)backpack_modules(installed modules, per-slot)voided_items(audit + full item bytes for recovery)
If you use the Void upgrade, the voided_items table is what makes “undo” possible via /backpack recover void ....
Backpacks are currently PLAYER_HEAD items and upgrades use normal materials by default, but both support CustomModelData.
To add custom textures/models later:
- Set
CustomModelDataper backpack type / upgrade inconfig.yml - Provide the corresponding resource pack models/textures on the client
This project uses Maven.
- Build:
mvn -DskipTests package - Output jar:
target/modularpacks-<version>.jar