DeluxePouches

Pouches

How players open pouches, and every option you can set on a pouch in pouches.yml.

A pouch is one entry in pouches.yml. It says what the item looks like, what is inside it, and what happens when someone opens it.

Three ways to open one

Right-click opens at the player, placing the pouch opens on that block, and shift with a stack opens everything at once
ActionWhat happens
Right-click, holding the pouchThe animation plays where the player stands. Works clicking air or a block.
Place the pouch as a blockThe block placement is cancelled and the animation plays on that spot instead. Good for group openings, everyone can watch.
Shift and right-click, or shift and place, with more than one pouch in handThe whole stack opens at once with no animation. Rewards from every pouch land together.

While a player is mid animation they cannot start another one. They get the already-opening message until the current opening finishes.

A minimal pouch

pouches.yml
pouches:
  starter:
    item:
      material: LEATHER
      name: "&a&lStarter Pouch &7(Right-Click)"
      lore:
        - "&7A basic pouch for new players"
        - ""
        - "&e&lRIGHT-CLICK &7to open!"
    animation: DEFAULT
    effect: SOUND_WAVE
    reward-amount: 2
    rewards:
      0:
        chance: 100
        commands:
          - "give %deluxepouches_player% minecraft:stone_pickaxe 1"
      1:
        chance: 100
        commands:
          - "give %deluxepouches_player% minecraft:bread 16"

The key under pouches: (here starter) is the pouch id. That is what you type in /dp give, and it is stored on the item so the plugin recognises it later. Keep it lowercase, no spaces.

After editing the file, run /dp reload.

Every pouch option

The item

Everything under item: describes the physical item players hold.

KeyWhat it doesDefault
materialRequired. A vanilla material such as DIAMOND, or a custom item such as nexo:my_pouch. See Custom items.none
nameDisplay name, colour codes allowed.material name
loreList of lore lines.none
glowtrue adds the enchantment shimmer without showing an enchantment.false
model-dataCustom model data number for a resource pack.none
skull-textureBase64 head texture. Only works when material is SKULL or PLAYER_HEAD.none
flagsList of item flags, for example HIDE_ATTRIBUTES.none

The opening

KeyWhat it doesDefault
animationWhich animation plays. See Animations.NONE
effectWhat fires when the rewards land. See Effects.NONE
effect-parametersPer pouch overrides for that effect, such as radius or colors.none
opening-soundA sound name played at the end, for example ENTITY_PLAYER_LEVELUP.none
reward-amountHow many rewards are drawn. See Rewards.1
rewardsThe reward list itself. Required, a pouch with none logs a warning.none

Messages and access

KeyWhat it doesDefault
opening-messageOne line sent when the pouch opens.the global opening-message in config.yml
opening-messagesA list of lines instead of one. Takes priority over opening-message.none
permissionExtra permission needed for this pouch specifically. Empty means anyone with deluxepouches.use can open it.none
hologramFloating text for this pouch. See Holograms.none
cooldownShown in the pouch menu as information.20

cooldown is displayed in the menu but it is not enforced. Players are only stopped from opening a second pouch while an animation is still running.

A full example

pouches.yml
pouches:
  legendary:
    item:
      material: DRAGON_EGG
      name: "&6&lLegendary Pouch &7(Right-Click)"
      lore:
        - "&7An ancient pouch containing"
        - "&7the most valuable treasures"
        - ""
        - "&e&lRIGHT-CLICK &7to open!"
      glow: true
    animation: PORTAL_RIFT
    effect: FIREWORK
    reward-amount: 3
    permission: pouches.legendary
    opening-messages:
      - "&6&l✦✦✦ &eLEGENDARY POUCH OPENED! &6&l✦✦✦"
      - "&e%deluxepouches_player% &7is about to discover incredible treasures!"
    hologram:
      enabled: true
      height: 1.25
      lines:
        - "&6&l✦ Legendary Pouch ✦"
        - "&7Opened by &f%deluxepouches_player%"
    rewards:
      0:
        chance: 100
        commands:
          - "give %deluxepouches_player% minecraft:netherite_ingot 2"
      1:
        chance: 50
        commands:
          - "give %deluxepouches_player% minecraft:totem_of_undying 1"
      2:
        chance: 10
        commands:
          - "give %deluxepouches_player% minecraft:elytra 1"
          - "broadcast &6&lLEGENDARY! &e%deluxepouches_player% &7found an &bElytra&7!"

How the plugin recognises a pouch

When a pouch is created the plugin stamps the pouch id onto the item, hidden inside the item data. That tag is what identifies it later, so renaming the item in an anvil does not break it, and a player cannot fake one by naming a piece of leather.

Pouches handed out before version 2.1.0 have no tag. Those still work, they fall back to matching on name and lore. Once your players have cycled through their old stock you can forget about it.

Handing pouches out

HowExample
Command/dp give Steve legendary 3
From the menu/dp gui, then left-click a pouch
From another pluginRun the give command from a crate, a vote listener, a quest reward, anything that can dispatch a command
From codeSee Developer API

Players never need a command to open one. Handing them the item is enough.

On this page