v2.5 (Read update notes)
Code (Text):
- ADDITION: You can now use "infinite" when setting the max coupon usages.
- ADDITION: You can now enable the "perm-based" functionality per coupon.
INFO: This system was designed to work with Xenforo/MineSync in order to allow
forum donors to claim a special (manually created) coupon. Don't forget to set
the last coupon reward (command) to a permission removal one.
- ADDITION: You can now add a "Permission: 'permission.node'" tag to coupons.
INFO: This can only be manually done by directly editing the coupons file.
Here you could view an example of this system working:
Scenario: You are syncing permissions with Xenforo and whenever
someone donates on your forum they get access to (for example): "xcoupons.donator".
You want those users to redeem their in-game perks via a coupon created by XCP.
Step 1: Manually create a new coupon including the new tags.
Example:
Coupons:
donator:
Quantity: -999 # -999 is the code for infinite amount of uses
Perm-Based: true # Perm-Based must be set to true
Permission: xcoupons.donator # Only users with this perm. node can redeem the coupon
Commands:
- 'group set %p donator'
- 'broadcast %p just redeemed donator'
- 'give %p diamond_block 16'
- 'give %p emerald_block 16'
- 'permission remove %p xcoupons.donator' # Remove the perm. so the user redeems their rank/perks once.
Step 2: Assuming someone purchased a rank and gets permissions synced with MineSync -- now, all they'd have
to do is use /redeem donator and that's it.
Note: Don't forget to save the coupons and reload the plugin!
Reset your configuration before updating!