Guide to use and configure the item stash
Item stash is used to put item rewards inside it. (Or really any supported item by running commands). This place is better than giving item directly into the players inventories, since it can be full quickly. The item stash on the other hand supports pagination and can hold any amount of items. Players can pick up items from here anytime they want.
The item stash is configured in itemstash.yml. Text in {{...}} comes from the custom section of your language files, see Per player localization. The menu items use the same options as any other menu item, see Item config.
config-version: 0
# Should we send a message to the player when they join the server and have unclaimed items?
notify-on-join: true
# What should be the /stash command? You need to specify at least one.
# Changing this requires a full restart
command-aliases:
- stash
- itemstash
# Where should be the stash items in the inventory?
stash-area: [
0, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44,
]
menu:
# Title of the inventory
title: "{{stash-title}}"
# Default filler item
filler:
enabled: true
item:
material: black_stained_glass_pane
name: " "
hide-tooltip: true
# Default gui items
items:
prev-page:
material: arrow
slot: 48
name: "{{prev-page}}"
lore:
- "{{prev-page-lore}}"
next-page:
material: arrow
name: "{{next-page}}"
slot: 50
lore:
- "{{next-page-lore}}"
current-page:
material: paper
name: "{{current-page}}"
slot: 49
lore:
- "{{current-page-lore}}"
collect-all:
material: chest
name: "{{stash-collect-all}}"
slot: 45
lore:
- "{{stash-collect-all-lore}}"
# You can add extra GUI items.
custom-items:
close:
material: barrier
name: "{{close}}"
slot: 53
lore:
- "{{close-lore}}"
on-click:
- "[close]"
Command | Description | Permission |
|---|---|---|
| Opens the item stash. This is a player command. |
|
| Opens another player's stash. Removing items is also possible here. |
|
| Add some items to the stash. |
|
| Deletes everything from a players stash. |
|
You can add items to the stash within your plugin. Just use the following code snippet:
AuroraAPI.getUserManager().getUser(player).getStashData().addItem(itemStack);