LimitedUses [BSP] - Allows to limit the amount of uses of shop items v1.0.5

This BossShopPro Addon allows to limit the amount of uses of items by adding a new type of condition

  1. Blackixx
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    LimitedUses
    This BossShopPro Addon allows to limit the amount of uses of items by adding a new type of condition.

    You want a powerful but free GUI plugin? Check out BossShop.

    Features

    • Adds a new conditions:
      • "uses" - Conditions based on the amount of previous purchases
      • "cooldown" - Give items a purchase-cooldown (in seconds)
    • Placeholders:
      • %uses% - Displays the amount of previous uses
      • %uses_<shop name>:<shopitem name>% - Displays amount of uses of a specific shopitem anywhere
      • %cooldown_<shop name>:<shopitem name>% - Displays remaining cooldown time of a specific shopitem anywhere
    • Super lightweight
    [​IMG]


    Commands
    (Optional; can for example be used to allow players to purchase more shopitem uses)
    • lius set <player> <shop> <shopitem> <count>
    • lius add <player> <shop> <shopitem> <count>
    • lius remove <player> <shop> <shopitem> <count>
    • lius reset <player> <shop> <shopitem>
    • lius reset <player>
    • lius resetall
    Requires the permission "LimitedUses.Modify".


    Example configuration:
    Code (Text):
      Obsidian:
        MenuItem:
        - type:OBSIDIAN
        - amount:64
        - name:&964 Obsidian
        - 'lore:&cPrice: %price%#&eBought: &4%uses%/10 &etimes.'
        RewardType: ITEM
        Reward:
        - - type:OBSIDIAN
          - amount:64
        PriceType: MONEY
        Price: 10000
        Message: '&eYou bought %reward%! Money left: &c%left%'
        ExtraPermission: ''
        InventoryLocation: 7
        Condition:
        - type:uses
        - below:10
    Code (Text):
    # This is an example shop, demonstrating the LimitedUses addon
    ShopName: LimitedUses
    DisplayName: '&4&lLimitedUses'
    Command: limiteduses
    signs:
      text: '[LimitedUses]'
      NeedPermissionToCreateSign: true
    shop:
      Diamond:
        MenuItem:
        - type:DIAMOND
        - amount:1
        - name:&dDiamond
        - 'lore1:&8You can purchase one diamond every ten hours.'
        - 'lore2:&cPrice: %price%.'
        RewardType: ITEM
        Reward:
        - - amount:1
          - type:DIAMOND
        PriceType: MONEY
        Price: 150.0
        Message: '&eYou bought a diamond for %price%.'
        ExtraPermission: ''
        InventoryLocation: 1
        Condition:
        - type:cooldown
        - over:36000
      Diamond_blocked:
        MenuItem:
        - type:BARRIER
        - amount:1
        - name:&f&lOut of stock
        RewardType: NOTHING
        PriceType: NOTHING
        Message: '&8Come back in %cooldown_LimitedUses:Diamond%.'
        ExtraPermission: ''
        InventoryLocation: 1
      StarterKit:
        MenuItem:
        - type:WOOD_PICKAXE
        - amount:1
        - name:&fStarter Kit
        - 'lore:&8Click to receive your starter kit.'
        RewardType: ITEM
        Reward:
        - - amount:1
          - type:WOOD_PICKAXE
        - - amount:1
          - type:WOOD_SPADE
        - - amount:1
          - type:WOOD_AXE
        - - amount:1
          - type:WOOD_SWORD
        - - amount:16
          - type:TORCH
        - - amount:32
          - id:4
        PriceType: NOTHING
        Message: '&eReceived your starter kit.'
        ExtraPermission: ''
        InventoryLocation: 2
        Condition:
        - type:uses
        - under:1
      StarterKit_blocked:
        MenuItem:
        - type:BARRIER
        - amount:1
        - name:&f&lOut of stock
        - 'lore:&cYou have already taken your starter kit.'
        RewardType: NOTHING
        PriceType: NOTHING
        Message: ''
        ExtraPermission: ''
        InventoryLocation: 2
      Obsidian:
        MenuItem:
        - type:OBSIDIAN
        - amount:64
        - name:&964 Obsidian
        - 'lore1:&cPrice: 10000 Money'
        - 'lore2:&cBought: &b%uses%&c/&b15 &ctimes.'
        RewardType: ITEM
        Reward:
        - - type:OBSIDIAN
          - amount:64
        PriceType: MONEY
        Price: 10000
        Message: '&eYou bought %reward%! Money left: &c%left%'
        ExtraPermission: ''
        InventoryLocation: 3
        Condition:
        - type:uses
        - under:15

Recent Reviews

  1. leoblanquez
    leoblanquez
    5/5,
    Version: v1.0.4
    Awesome plug in. Just one thing how do you get the cooldowns to work? I get Message: '&8Come back in %cooldown_LimitedUses:Diamond%.'
    1. Blackixx
      Author's Response
      Thanks for the review. If you have questions please contact me via Spigot PM :)
  2. helomi
    helomi
    5/5,
    Version: v1.0.3
    The best plugin and developer i've ever seen.
    (Feathure request)
    Its possible add command for cooldowns too?
    For example:
    lius set <player> <shop> <shopitem> <cooldown> <tipe>
    Type: I mean seconds, minutes, hours etc.
    1. Blackixx
      Author's Response
      Thanks & good idea.
  3. BF3Chilled
    BF3Chilled
    5/5,
    Version: v1.0.2
    awsome plugin!
    just one thing doesnt work for me:
    Message: '&8Come back in %cooldown_LimitedUses:Diamond%.'
    the cooldown variable doest work for me

    keep up that great work!
    1. Blackixx
      Author's Response
      Thanks for the rating :) Glad you solved the issue (According to your PM).
  4. evernife
    evernife
    5/5,
    Version: v1.0.2
    Awsome plugin!

    It should be good to be able to set priority.

    For exemple, i want to set in the same slot the possibility to buy diamond 10 times, and after player buys the 10 times, appear another item, like an emerald in that slot.
    1. Blackixx
      Author's Response
  5. CopyPaste
    CopyPaste
    5/5,
    Version: v1.0.2
    Hi, this is a really great plugin but when I try to delete the uses.yml file (to be able to buy things again) when I reload the plugin it reset itself.
    1. Blackixx
      Author's Response
      First of all thanks for the review! :) You need to delete the file while the server is stopped, because every time you stop the server LimitedUses saves its data into the uses.yml file.
  6. instantout
    instantout
    5/5,
    Version: v1.0.2
    Amazing! Yup i jad tomcome back and check, so might aswell give it a 5 Star since i havent run in any Bugs
    1. Blackixx
      Author's Response
      Thanks instantout :)