Skip to content

SnSimpleVouchers v2.1.0

Choose a tag to compare

@ValentinTarnovsky ValentinTarnovsky released this 04 Aug 11:51
· 31 commits to main since this release

Changes

New: /voucher giveall <voucher> [amount] [-s]

Hands a voucher to every online player in one command. Same grammar as /voucher give minus the target: the trailing [amount] [-s] pair is read in either order, and amount is the amount per player, never a pool split between them. An auto-claim voucher dispatches its rewards to everyone instead of minting items.

The pass never aborts part way. A player who cannot be served is counted and skipped, and the sender gets a summary at the end naming how many received and how many were skipped. -s suppresses every line, sender and receivers alike.

New permission snsimplevouchers.admin.giveall (default op, child of snsimplevouchers.admin).

New config key: give.drop-overflow

Controls what happens when the voucher items do not fit in the receiver's inventory.

give:
  drop-overflow: true
  • true (default, and what every give did before this version): the receiver keeps what fits and the rest drops at their feet, so nothing is ever lost.
  • false: all-or-nothing. A receiver without room for the whole stack gets nothing, and the giver is told they were skipped. A partial delivery never happens, so a giver is never told they handed over 10 vouchers that turned into 4.

The key applies to all three ways a voucher item reaches a player: /voucher give, the new /voucher giveall, and the give-on-click of /voucher open. Auto-claim vouchers are unaffected, since they dispatch rewards and never produce an item that could overflow.

New messages

messages.inventory-full, messages.give.inventory-full and the four messages.giveall.* lines merge into your language file on boot; your existing values and comments are untouched.

Installation

Download the JAR below and place it in your plugins folder. Requires SnLib.