Home›Java›Mods›KranciVoucher - Vouchers & Pouches
KranciVoucher - Vouchers & Pouches
ModsJava

KranciVoucher - Vouchers & Pouches

Java mod listed for Minecraft 1.21–26.x. Download on the author's site.

⬇ Download on Spigot
Questions, bugs or ideas? Join our Discord: discord.gg/VeNKPKnNVD​

KranciVoucher
Rewards in an item. Money, XP, items or commands - or a pouch that draws one prize from a weighted table and opens with an animation.
Free, with nothing held back. No required dependency. One jar for Paper 1.21.x and 26.x.
​

A voucher is an item a player right clicks for what it holds. A pouch is the same item with several possible prizes and a reason to watch: the reel races across the row, slows down, and stops on the one they won, which is then written across their screen.

Highlights

A pouch file
Code (YAML):
# vouchers/money/coin-pouch.yml  ->  the voucher "coin-pouch" in the folder "money"
type
: pouch

item
:
  material
: player_head
  head
: 'player:MHF_Question'       # or base64, a texture url, a hash, or hdb:1234
  name
: '<gradient: #ffd34d:#ff8a00><bold>Coin Pouch</bold></gradient>'
  glint
: true

limits
:
  uses-per-item
: 1
  per-player
: 0                     # 0 = no limit
  global
: 0                         # 0 = no limit, server wide
  cooldown-seconds
: 0

contents
:                           # one of these is drawn, by weight
  small
:
    weight
: 50
    icon
: gold_nugget
    display
: '<white><random:100-400> coins'
    money
: '<random:100-400>'
  jackpot
:
    weight
: 5
    icon
: nether_star
    display
: '<gold><random:3000-5000> coins'
    money
: '<random:3000-5000>'
    messages
:
     - ' %prefix%<gold>The jackpot! Nicely done.'

animation
:
  enabled
: true
  style
: reel                       # reel | flip | count-up
  duration-ticks
: 60
  notice
: title                     # title | action-bar | chat | none
A plain voucher
Code (YAML):
type : standard

reward
:
  money
: '<random:250-750>'
  experience
: 20
  display
: '<gold><random:250-750> coins'
  items
:
    - material
: diamond
      amount
: '<random:1-3>'
    - bread:16                       # the short form
  commands
:
    - 'console
: lp user %player% parent add vip'
    - 'player
: spawn'
    - 'op
: gamemode creative'       # operator for that one command, taken back in a finally block
  messages
:
   - ' %prefix%<green>Enjoy.'

where
:
  blocked-worlds
: [arena ]
  blocked-regions
: [spawn ]

animation
:
  enabled
: false                     # this one pays the moment it is clicked
Commands
Aliases: /vouchers, /kv. In the menu an admin right clicks an icon to take one, shift + right clicks for a stack; a left click is a preview for everybody.

Permissions
Both are registered in plugin.yml, so a permission plugin can take them away as well as give them.

Placeholders
%krancivoucher_vouchers%, %krancivoucher_folders%, %krancivoucher_used_<id>%, %krancivoucher_left_<id>%, %krancivoucher_global_<id>%, %krancivoucher_globalleft_<id>%, %krancivoucher_name_<id>%, %krancivoucher_folder_<id>%, %krancivoucher_type_<id>%, %krancivoucher_rewards_<id>%.

For developers
Code (Java):
KranciVoucherService vouchers = Bukkit. getServicesManager ( ). load (KranciVoucherService. class ) ;
vouchers. give (player, "coin-pouch", 1 ) ;
RedeemOutcome outcome = vouchers. redeem (player, "coin-pouch" ) ;
int used = vouchers. timesUsed (player, "coin-pouch" ) ;
Events: VoucherRedeemEvent (cancellable, before anything is spent) and VoucherRedeemedEvent (after, carrying the amount that was actually rolled).

More screenshots
[ATTACH type="full" alt="KranciVoucher"]1580580[/ATTACH]
[ATTACH type="full" alt="KranciVoucher"]1580581[/ATTACH]
[ATTACH type="full" alt="KranciVoucher"]1580582[/ATTACH]
[ATTACH type="full" alt="KranciVoucher"]1580584[/ATTACH]
[ATTACH type="full" alt="KranciVoucher"]1580585[/ATTACH]
[ATTACH type="full" alt="KranciVoucher"]1580587[/ATTACH]

Tested

Good to know, honestly

Support
Found a bug or have an idea? Join our Discord: discord.gg/VeNKPKnNVD
KranciVoucher exists because heymaark suggested it there - if it is useful, a review means a lot.
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

KranciVoucher - Vouchers & Pouches is a free Minecraft Java mod. Compatible with Minecraft 1.21, 26.1, 26.2, 26.3. Available via Spigot. Download it and open it directly in the game.

Explore more