Custom Sell Match Method

Default Sell Match Method

Vanilla Items

By default, we support two sell match method, they are:

  • Bukkit: This sell method require inventory's item must 100% same as product item, if the item player has changed some thing, it can not be selled anymore. For example, add enchantments or change item name in anvil, they will change item's NBT info.

  • ItemFormat: ItemFormat only supports read vanilla NBT, and can set ignore list of item's vanilla NBT. If you add enchants and name in ignore list, then player can still sell item even the item has more enchantments or changed item name.

Example config:

sell:
  # Support Value: Bukkit or ItemFormat.
  # For each product, you can add match-item section to make custom sell match method, for more info, please view Wiki.
  sell-method: Bukkit
  # Only support ItemFormat sell method.
  ignore-item-format-key:
    - 'lore' 
    - 'damage'
    - 'tool.damage-per-block'

Third-plugin Item

Items generated by Supported Plugins will auto parse it's Item ID and compare it with the item ID you set in Item Format's hook-item option, so no matter how it changes, it will eventually sell normally.

Custom Sell Method for each product - Require MythicChanger

Although the ItemFormat method described above solves the problem of items being modifiable, its flexibility is still insufficient. Therefore, this feature can help you set custom product sell modes for each product.

You can add a match-item section in the configuration of each product or price, which means that if the item meets this matching rule, it is considered sellable.

ItemFormat is still required if you want give player the item you set here after player try buy this product and display it in plugin's placeholder and shop GUI.

This feature require your server must install MythicChanger plugin, please get it here:

FREE: Click to download

PREMIUM: Click to download

For how to configure the match-item section, please read MythicChanger's wiki, click here to visit. Please note that some of the match rules require PREMIUM version of MythicChanger, not PREMIUM version of UltimateShop!

An example product config can be found below, in this example, both emerald and diamond can be selled, but only diamond are display in shop, after player try buy this product, he will only get diamond because match-rule section does not effect buy.

  A:
    price-mode: ALL
    product-mode: CLASSIC_ALL
    products:
      '1':
        material: diamond
        amount: 1
        match-item: # This is added match-item section.
          material: # This is the match rule key! Read MythicChanger wiki for list of them!
            - diamond
            - emerald
          has-name: false # This is the match rule key! Read MythicChanger wiki for list of them!
      '2':
        // more sub products here?

Last updated