Backpacks
Backpacks are a core convenience feature of EdTools, providing players with a way to automatically collect items without cluttering their inventory. These backpacks can be upgraded for larger capacity and better multipliers, and they feature a fully integrated auto-selling system.
Configuration (backpacks.yml)
The entire backpack system is configured in the backpacks.yml file. This file is split into two main sections: config and backpacks.
Main config Section
This section controls the global behavior and appearance of the backpack feature.
Example: config
config:
gui: 'backpack'
autosell:
permission: 'edtools.autosell'
enabled-by-default: false
item:
enabled: true
hotbar-slot: 8
item:
material: 'texture-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvM2ZkMTcwNDAwOGJjNjgzZGM4ZTZlOGZmN2MxMGUwY2YyNGQ3MmI4ZjMwNmRlMjYzMWUzZmViZmRlNjQ5MWM0ZCJ9fX0='
name: '&d&lYour Backpack'
lore:
- '&7Automatically collect all blocks'
- '&7broken into this backpack.'
- '&r'
- ' &a* &bStorage: &a%edtools_backpack_size_formatted% &8/ &c%edtools_backpack_maxsize_formatted%'
- '&3'
- '&d[ᴄʟɪᴄᴋ ᴛᴏ ᴏᴘᴇɴ ʏᴏᴜʀ ʙᴀᴄᴋᴘᴀᴄᴋ]'
gui: The ID of the GUI file from the /guis/ folder that opens when a player interacts with their backpack.
autosell:
permission: The permission node a player must have to use the auto-sell feature.
enabled-by-default: If true, auto-sell is on for everyone by default. If false, players must have the specified permission to use it.
item: An Item Container that defines the backpack item.
enabled: Set to true to give players the backpack item.
hotbar-slot: The hotbar slot (0-8) where the backpack item will be placed.
The item subsection defines the material, name, and lore. It supports placeholders like %edtools_backpack_size_formatted% to display dynamic information.
Backpack Tiers Section
This section defines the different upgrade levels for the backpacks. The first entry in the list is the default backpack that all players start with.
Example: backpacks
backpacks:
"1":
size: 10000
"2":
size: 50000
multiplier: 0.2 # 20% blocks multiplier
cost:
currency: 'farm-coins'
amount: 1000000
"3":
size: 200000
multiplier: 0.5
cost:
currency: 'farm-coins'
amount: 5000000
Each entry is a new tier for the backpack, identified by a unique ID (e.g., "1", "2", "vip-pack").
size: (Required) The total storage capacity of the backpack at this tier.
multiplier: (Optional) An item collection multiplier. For example, a value of 0.2 grants a 20% bonus, so collecting 100 items would add 120 to the backpack. The formula is items * (1 + multiplier).
cost: (Optional) The cost to upgrade to this tier. If omitted, the tier cannot be purchased.
currency: The ID of the currency required for the upgrade (e.g., farm-coins, vault).
amount: The amount of the specified currency needed.
NBT Data Tags
To distinguish backpack items from other items, the plugin adds a specific NBT tag to the item stack. This allows the system to identify the backpack regardless of its material, name, or lore.
edtools_backpack: A simple tag that marks the item as a managed backpack. Its value is not critical.
Player Data
A player's current backpack tier and its contents are stored in their player data file, not on the item itself. This ensures that the data persists even if the player loses or temporarily stores the backpack item.
Last updated
Was this helpful?