Aurora
  • Aurora
  • Commands
  • Main config
  • Custom Menus
    • Requirements
  • Command dispatcher
  • Item config
  • Item stash
  • Economy providers
Powered by GitBook
On this page
  • Configuration
  • Commands
  • API Usage

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: "Item stash"
  # 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: "&fPrevious Page"
      lore:
        - "&7Click to go to the previous page"
    next-page:
      material: arrow
      name: "&fNext Page"
      slot: 50
      lore:
        - "&7Click to go to the next page"
    current-page:
      material: paper
      name: "&fCurrent Page &7({current}/{max})"
      slot: 49
      lore:
        - "&7You are currently on page {current}"
    collect-all:
      material: chest
      name: "&aCollect all"
      slot: 45
      lore:
        - "&7Click to collect all items"
  # You can add extra GUI items.
  custom-items:
    close:
      material: barrier
      name: "&cClose"
      slot: 53
      lore:
        - "&7Click to close the menu"
      on-click:
        - "[close]"

Commands

Command
Description

/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);
PreviousItem configNextEconomy providers

Last updated 7 months ago