Earlier Versions
| Name | Size | Uploaded | Game Version | Downloads | |
| Redeem.jar beta | 5.31 KB | Jan 2, 2017 | 1.11 | 118 | Download |
| Redeem.jar beta | 5.32 KB | Jan 2, 2017 | 1.11 | 44 | Download |
Description
This is a simple plugin that allows users to claim rewards using a redeem code. Redeem codes have a configurable amount of uses. When a user redeems a code, configurable commands are executed.
If an administrator wants to reset the amount of uses that a code has, they can use the command /resetcode <code>.
Note that any changes made to the config.yml while the server is online will be overwritten when the server reloads, restarts, or an administrator uses /rsave. If you need to make changes, make sure that the server is offline or use /rreload.
Current commands:
- /redeem <code> – redeem a code
- /resetcode <code> – resets a code's uses
- /rreload – reloads the config.yml. Note that if a player uses a code before this command is run but after the last /rsave, server reload or server restart, the 'uses' value will be overwritten.
- /rsave – pushes updates made to redeem codes to the config.yml (this will overwrite any changes made)
Config:
# Note that using /rsave will overwrite any changes made to the codes. Also, if a user redeems a code, then an administrator types /rreload, the rreload will overwrite the uses (even though a player redeemed a code, the amount of uses will not go down).
codes:
'1234': This is the code that players can use.
uses: 1 # The amount of uses that this code has (see header before changing).
initialUses: 1 # The amount of uses by default (reset when an administrator types /resetcode <code>
commands: # These are the commands run when a player redeems a code.
- give {player} diamond 1 # Use {player} to specify the player redeeming the code
minecraft:
uses: -1 # A negative number is used to indicate that this code has no limit to its uses
initialUses: -1
commands:
- tell {player} Hello, World!
If you have any suggestions or questions, PM me.
Get 0.05 TON 💎
Download

Add a comment