Item stash
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.
Configuration
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.
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]"Commands
/stash
Opens the item stash. This is a player command.
/stash add <player> <item> [amount] [silent]
Add some items to the stash. If silent is provided and it is true, there won't be any feedback message. Do note that the amount max value is 64 or whatever the vanilla item maximum stack size is.
/stash clear <player>
Deletes everything from a players stash.
API Usage
You can add items to the stash within your plugin. Just use the following code snippet:
AuroraAPI.getUserManager().getUser(player).getStashData().addItem(itemStack);Last updated