Single Things

Each single product or price in one product we called single thing.

Things

Here is an example of 2 product configs:

items:
  A:
    price-mode: CLASSIC_ALL
    product-mode: CLASSIC_ALL
    products:
      1:
        material: STRING
        amount: 1
        give-actions:
          - 'message: You get a string!'
    buy-prices:
      1:
        match-placeholder: '%player_health%'
        amount: '1.65'
        placeholder: '{amount}$'
        start-apply: 0
    sell-prices:
      1:
        match-placeholder: '%player_health%'
        amount: '1.65'
        placeholder: '{amount}$'
        start-apply: 0
        give-actions:
          - 'console_command: eco give {player} {amount}'
  B:
    price-mode: CLASSIC_ALL
    product-mode: CLASSIC_ALL
    products:
      1:
        material: FEATHER
        amount: 1
    buy-prices:
      1:
        economy-plugin: Vault
        amount: '0.55'
        placeholder: '{amount}$'
        start-apply: 0
    sell-prices:
      1:
        economy-plugin: Vault
        amount: '0.52'
        placeholder: '{amount}$'
        start-apply: 0

Each product have those thing type:

  • Buy Prices: The buy price of this product, player need pay the buy price to obtain this product, if this thing type do not exist (which means buy-prices section does not exist in the config), this product can not be purcahsed.

  • Sell Prices: The sell price of this product, player need sell the products to shop, then he will get the sell price you set here, if this thing type do not exist (which means sell-prices section does not exist in the config), this product can not be sold.

  • Products: The products of this product, player will get the products you set here after buy, and need give his products to shop when selling.

Single Thing

Each thing type can set unlimited related to single things, like set 5 buy prices, 100 sell prices and even 1k products!

Each single thing have those types:

  • Vanilla Item: Use ItemFormat to tell us what Minecraft item you want to sell in shop or you want to player pay. (Buy/Sell/Products)

  • Hook Item: Use Supported Plugins's item to tell us what custom item you want to sell in shop or you want to player pay. This type still use ItemFormat.(Buy/Sell/Products)

  • Match Item: Use Custom Sell Match Method to tell us which items you want to match. (Buy/Products)

  • Vanilla Economy/Hook Economy: Use EconomyFormat to tell us how much money you want to player pay or give to player. (Buy/Sell/Products)

  • Custom: If those types do not meet your need, you can make a custom single thing! You need add match-placeholder option at single thing config to make plugin know what the now amount player have of this custom product/price, and then we will compare the now amount you set here and the required amount. In the example above, we will compare player's health. If your economy plugins do not supported, just place it's player balance placeholder here and all is solved! (Sell/Products) (Premium)

  • Free: Single thing do not include ItemFormat, EconomyFormat, match-item section and match-placeholder section will be consider as free.

Actions and Conditions

You can set action will run when the single thing is been give to player, and set the conditions that player need meet to use the single thing. This is very useful you want to play sound, excute command after player buy or sell.

  • Actions: Add give-actions section in single thing config. For more info, please view Shops page. Very useful for command shop, permission shop, enchant shop. Also, if your economy plugins/item plugins do not supported in UltimateShop, just put the command of give money/item here to solve the problem! ({player} means player name, {amount} means the price/product amount) If you want to make the product be actions only, don't forget add give-item: false in the single thing option!

  • Conditions: Add conditions section in single thing config. For more info, please view Shops page.

Example of use actions in single thing config (Spanwer Shop/Commmand Shop)

items:
  A:
    price-mode: CLASSIC_ALL
    product-mode: CLASSIC_ALL
    display-item:
      name: 'Chicken Spawner'
      material: PLAYER_HEAD
      skull: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjQ3ZTJlNWQ1NWI2ZDA0OTQzNTE5YmVkMjU1N2M2MzI5ZTMzYjYwYjkwOWRlZTg5MjNjZDg4YjExNTIxMCJ9fX0=
      amount: 1
    buy-prices:
      1:
        economy-plugin: Vault
        amount: 350000
        placeholder: '{amount}⛂'
        give-actions:
          - "console_command: ws give %player_name% spawner chicken 1"

Example: Seasonal Price

items:
  A:
    price-mode: CLASSIC_ALL
    product-mode: CLASSIC_ALL
    products:
      1:
        material: potato
        amount: 1
    buy-prices:
      1:
        economy-plugin: Vault
        amount: 2
        placeholder: '&6{amount} Coins'
        conditions:
          - 'placeholder: %rs_season%;;==;;Spring'
      2:
        economy-plugin: Vault
        amount: 1.8
        placeholder: '&6{amount} Coins'
        conditions:
          - 'placeholder: %rs_season%;;==;;Summber'
      3:
        economy-plugin: Vault
        amount: 3.2
        placeholder: '&6{amount} Coins'
        conditions:
          - 'placeholder: %rs_season%;;==;;Fall'
      4:
        economy-plugin: Vault
        amount: 8.8
        placeholder: '&6{amount} Coins'
        conditions:
          - 'placeholder: %rs_season%;;==;;Winter'     

Example: Use for not supported item plugins

    display-item:
      material: APPLE
    products:
      1:
        # Sell Match
        match-item:
          contains-lore:
            - 'test1'
        # Buy Give Command
        give-actions:
          - 'console_command: items give {player} {amount}'
          - 'message: ff22'
        amount: 500

Last updated