divios / DailyShop

Spigot plugin. Fully configurable shop with daily offers. NBT & multi-currency support and more!
https://www.spigotmc.org/resources/daily-shop-free-random-items-shop-customizable-items-timer-nbt-support-and-more.86907/
29 stars 15 forks source link

Ability to have a starting stock, and a max stock. #163

Closed refractored closed 2 years ago

refractored commented 2 years ago

It'd be nice to have this feature because atm you cant sell items when the shop resets because its already at the max stock.

divios commented 2 years ago

Hi! You can already do that. Here is an exmaple:

Diamond:
  material: DIAMOND
  buyPrice:
    fixed: 30
  stock:
    type: GLOBAL
    amount: 4
    max: 10
    incrementOnSell: true
    allowSellOnMax: false

Here, diamond will have a start stock of 4, and the max amount of the stock is 10. You can also specify whether the stock should increase when items are sold incrementOnSell and also whether you want to allow items to be sold even if the stock is at maximum allowSellOnMax.

refractored commented 2 years ago

Ahh okay thanks