Webdeals 1.1

Allow players to redeem coupons using in-game money

  1. Okx
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    Source Code:
    This plugin adds an additional currency in-game which players can use to redeem coupons with, either with Buycraft or Enjin Donation Store.

    Additionally, this plugin uses bStats.

    You must either have the plugin BuycraftX or EnjinMinecraftPlugin already installed on your server. If you are using Buycraft, you must be at least on the Premium plan. If using Enjin, you must be at least on the Advanced plan.

    If using the free plan on either, the plugin will not work as the free plan does not provide enough features.

    1. Put this in your /plugins/ folder
    2. Restart your server to allow the configuration files to generate.
    3. If you are using Buycraft, skip to step 5
    4. If you are using Enjin, go into the config.yml and set preset_id and domain to the appropiate values (more information on what they should be set to is in the config)
    5. If you want to allow players to buy money to use in the store you can set the buy configuration option.
    6. You can also set the values of the different coupons players can redeem, or leave it at the default.
    7. The plugin should automatically get the secret key for Enjin/Buycraft.
    You can see all commands by running /webdeals help.
    You can also run some commands by just doing /webdeals, which will show the GUI, where you can view your balance, redeem coupons, view available coupons, or run /webdeals help.

    Note that you can replace /webdeals with any of: /wd, /wds, /webdeal.


    The permission for /webdeals is webdeals.command which is provided by default.

    Additional permissions are:

    • /webdeals help webdeals.command.help (default)
    • /webdeals pay/give webdeals.command.pay (default)
    • /webdeals bal/balance webdeals.command.balance (default)
    • /webdeals bal/balance <player> webdeals.command.balance.other (default)
    • /webdeals add webdeals.command.admin.add (op)
    • /webdeals take webdeals.command.admin.take (op)
    • /webdeals set webdeals.command.admin.set (op)
    • /webdeals reload webdeals.command.admin.reload (op)
    All messages are configurable in messages.yml

    Code (Text):
    # Please read the following page on how to use formatting in strings (ie %s)[/SIZE][/SIZE][/SIZE][/SIZE]
    [SIZE=6][SIZE=4][SIZE=6][SIZE=4]# https://docs.oracle.com/javase/9/docs/api/java/util/Formatter.html
    # Note that whenever %s is used, it is optional.

    # See the following for information on how to change 'money_format'
    # https://docs.oracle.com/javase/9/docs/api/java/text/DecimalFormat.html
    # If you just want to change the currency, just change the $ character to whichever you like, ie £
    # It is very important to change the currency to what you are using if you are not using dollars!
    # Otherwise people will get confused. Because if the main currency in your store is £
    # and you have the money format using $, the plugin will say a coupon's worth $10 but it will actually be worth £10!

    # For colour formatting, see the following
    # https://minecraft.gamepedia.com/Formatting_codes

    money_format: '$#,##0.00'

        usage: '/%s add [player] <amount>'
        success: '&eGave %s to %s. They now have %s.'
        usage: '/%s take [player] <amount>'
        success: '&eTaken %s from %s. They now have %s.'
        usage: '/%s set [player] <amount>'
        success: '&eSet the balance of %2$s to %1$s.'
        usage: '/%s reload'
        success: '&aReloaded config.'
        usage: '/%s balance [player]'
          self: '&6You have &e%2$s'
          other: '&e%s&6 has &e%s'
        usage: '/%s pay <player> <amount>'
        not_enough: '&cYou do not have that much money!'
        success: '&aPaid &e%s&a to &e%s&a. You now have &e%s'
        usage: '/%s buy <amount>'
        disabled: '&cYou cannot buy!'
        not_enough: '&cYou do not have enough much money! You need %s'
        success: '&6You have bought &e%s &6for &e%s&6. You now have &e%s'
          usage: '&a%s&e Give a player money to spend in the store.'
          permission: webdeals.command.admin.add
          usage: '&a%s&e Take money from a player so they cannot spend it in the store.'
          permission: webdeals.command.admin.take
          usage: '&a%s&e Set the balance of a player.'
          permission: webdeals.command.admin.set
          usage: '&a%s&e Reload configuration files.'
          permission: webdeals.command.admin.reload
          usage: '&a%s&e Check the balance of you or another player.'
          permission: webdeals.command.balance
          usage: '&a%s&e Pay a player a certain amount of money.'
          permission: webdeals.command.pay
          usage: '&a%s&e Buy money to spend in the store with in-game currency.'
          permission: webdeals.command.buy
          name: '&6Balance'
          description: '&7&oSee how much you have to spend in the store.'
          name: '&6Redeem'
          description: '&7&oRedeem your balance for a coupon.'
          please_wait: '&ePlease wait, generating coupon...'
          name: '&6Coupons'
          description: '&7&oShow coupons you have created.'
          please_wait: '&ePlease wait, getting coupons...'
          none: '&cYou have no coupons.'
          name: '&6Help'
          description: '&7&oShow commands you can use'
        name: '&6Coupon worth &e%s'
        name: '&6Coupon worth &e%s'
        description: '&8&oCode: &7&o%s'
      creation_error: '&cThere was an error creating the coupon. You have not been charged. This could be because the secret key has not been found.'
      success: '&6You have created a coupon worth &e%s&6, the code is &e%s'
      not_enough: '&cYou do not have enough to create a &e%s &ccoupon! You have &e%s&c, you need &e%s &cmore.'
      code: '&6Code: &e%s'
      player_required: '&cYou must be a player to use this command!'
      invalid_player: '&cCannot find player: %s'
      invalid_number: '&cInvalid number: %s'
      no_permission: '&cYou do not have permission to run that command!'
      get_coupons: '&cFailed to get coupons. This could be because the secret key has not been found.'
    Code (Text):
    # This is the list of the possible worth of coupons people create.
      - 5
      - 10
      - 20
      - 50

    # This section is only important if you're using the Enjin store, not the Buycraft store
      # The preset ID for the store
      # To find the preset ID for an Enjin DonationCraft store, open up the URL to edit the store.
      # The url should look like this http://www.mycoolserver.enjin.com/admin/editmodule/index/preset/123456
      # The preset_id is whatever the 123456 is.
      preset_id: 0

      # The domain for your Enjin website. Must include the http:// or https://
      domain: http://mycoolserver.enjin.com

    # How much one unit of currency (ie one dollar or one pound) can be bought for with in-game currency. Set to 0 to disable.
    buy: 0

    Note that due to technical limitations, coupons redeemed for Enjin can only be used by the player who redeemed it.

    If you experience any issues join my Discord.
    If this plugin was useful to you, please leave a positive review!

Recent Updates

  1. Automatically get Buycraft/Enjin secret