RedeemMe 1.4

Give away codes for goodies!

  1. Freack100
    Hello and welcome to RedeemMe!



    What is RedeemMe?
    RedeemMe is a plugin which allows you to generate codes which you can give away so your users can get goodies for them. Right now, every code is one-time-use only, but I think about adding a promo-code like feature too.

    Features
    • Almost fully customizable.
    • You can add as many code "types" as you want, easily editable in the config
    • Every code is able to execute specific commands when redeemed.
    • Not-so-fancy messages (need to fix that ASAP, just wanted to get a working version out) :p

    How to use?
    1. Download the plugin.
    2. Download Vault. (I built the plugin against 1.4.1, i don't know if others work too.)
    3. Place both in your plugins folder.
    4. Restart your server.
    5. Add a new type of codes. (More information about that down this post)
    6. Restart/Reload the server another time.
    7. do /generateCode <type> and you will receive your code.
    8. Give the code to a user and see how happy they are :D

    Commands
    • Command | Permission-node (<> neccessary | [] optional)
    • /generateCode <type> ["mode"]| redeemme.generate
    • /removeCode <code> | redeemme.remove
    • /removeAllCodes | redeemme.removeAll
    • /redeemCode <code> | No permission node right now

    Code Types
    Here I will tell you how you can make your own code-types.
    Let's look at an example config:

    Code (Text):

    codeLength: 10
    useEconomy: true
    useServer: true
    server:
       ip: 127.0.0.1
       password: YouWillNeverGetThisPassword
    usePassword: true
    codeTypes:
        op:
            commands:
            - /op %USERNAME%
            - /say %USERNAME% is now OP!
           price: 10
        diamond:
            commands:
            - /give %USERNAME% minecraft:diamond 1
     

    As you can see, right now It's pretty simple. Create a new section in codeTypes with the name of the code, add the "commands" section and add any commands you want into a list there. If "price" is not set, it won't charge any money for the generation of the code.
    There are also some placeholders (right now, 3) which are %USERNAME%,%CODE% and %TYPE% which, I think, I don't have to explain.


    TODO
    • Add per-type generation permission nodes (ex. redeemme.generate.diamond)
      (Added in RedeemMe 1.1)
    • Add Vault support so normal players could pay for generating a code. (Added in RedeemMe 1.2)
    • Fix the "broken" command validity checking.

    Bugs
    It will throw errors when you used the command wrong.

    License
    This plugin is licensed under the WTFPL.
    All the source code can be found here: https://github.com/TheFreakLord/RedeemMe

    If you really modify my code, please tell me, you don't have to, but I just want to know if my code helped anyone in any way :)

    Changelog
    Version 1.4: Promo codes.

    Version 1.3.2-dev: Preparation for promo codes and new way of saving.
    Version 1.3.1: Hotfix.
    Version 1.3: Added HTTP API.
    Version 1.2: Added Economy support.
    Version 1.1: Added lang.yml and per-type permission nodes.
    Version 1.0: Initial Release.

Recent Reviews

  1. 123keelos
    123keelos
    4/5,
    Version: 1.4
    It actually is a nice plugin
  2. MikeA
    MikeA
    5/5,
    Version: 1.2
    Looks nice, haven't seen one of these type plugins in a long time - I might have a good use.
    1. Freack100
      Author's Response
      Allways good to hear that someone got a use for my work, thanks! :)
  3. vcoN00B
    vcoN00B
    3/5,
    Version: 1.1
    Looks good :)
    1. Freack100
      Author's Response
      Thanks :)