ItemData

Nov 5, 2017
ItemData
  • Well, I want the users of this plugin to be able to create all kinds of existing items, including enchantments, potion effects, durability etc.

    In order to do this I thought about something completely new: ItemData. It is very easy to work with ItemData.


    All you need is a list of attributes of the item you want to create. The order of the attributes does not matter at all. If your ItemData contains mistakes BossShopPro will log them in the "BugFinder.yml" file.

    ItemData should contain at least two things: Type/id and amount.

    - 'type:STONE'
    - amount:10

    or
    - 'id:1'
    - amount:10

    Having problems reproducing an item?
    Simply type "/bs read" ingame while holding an item. BossShopPro will show you how the item is built up in chat and additionally save the itemdata of the item in the "plugins/BossShopPro/ItemDataStorage.yml" file. new!
    [​IMG]


    There are many different kinds of attributes you can use:


    type:<type/id>

    This defines the material of the item. You can for example use 'type:1' or 'type:stone' in order to make your item stone.
    • You can find a list of types here: Link
    • You can find a list of IDs here: Link
    • The setup tool auto-completes material names


    amount:<number>
    This should be clear.


    durability:<number>
    Durability does different things. For example it defines the damage of Armor/Weapons/Tools and it defines the color of wool.


    name:<name>
    This is the displayed name of the item.
    • Supported placeholders and symbols: Link
    You want an empty item name? A dirty workaround would be using color codes only: "name:&1".


    lore:<line1#line2#line3>
    This is the lore of the item.
    You can use color codes like &4 (=DARK_RED) or &l (= BOLD).
    You can "switch" to the next line using "#".
    • Supported placeholders and symbols: Link
    All following ways allow you to create lores:
    Code (Text):
    C) (new)
    item:
    - 'name:Name of item'
    - 'lore1:Line 1'
    - 'lore2:Line 2'
    - 'lore4:Line 4'
    - 'lore5:Line 5'

    A) (traditional)
    item:
    - 'name:Name of item'
    - 'lore:Line 1#Line 2##Line 4#Line 5'

    B) (other)
    item:
    - 'name:Name of item'
    - 'lore:Line 1'
    - 'lore:Line 2'
    - 'lore:'
    - 'lore:Line 4'
    - 'lore:Line 5'

    enchantment:<enchantment name/id>#<level>
    Use this attribute to enchant your item.
    Example: 'enchantment:damage_all#5' or 'enchantment:16#5' <- This would add Sharpness V to your item.
    • Here you can find a list of Enchantments: Link
    • The setup tool auto-completes enchantment names


    color:<red number>#<green number>#<blue number>
    Use this attribute to dye your item (works with leather armor).
    Example: 'color:110#10#140'
    How does it work? Well, just define how red/green/blue the color shall be. You can find a list of RGB colors here: http://www.farb-tabelle.de/de/farbtabelle.htm


    potion:<potion name>#<extended? true/false>#<upgraded? <true/false> new!
    This allows you to add vanilla potion effects to items. Can be used on items which support potioneffects only!
    Example: 'potion:MUNDANE#true#false' <- This would make the item a mundane I potion with extended duration.
    • Here you can find a list of Potion types: Link
    • The setup tool allows to choose between the existing potion types quickly


    potioneffect:<potion name>#<level>#<time in seconds>
    This allows you to add custom potion effects to items. Can be used on items which support potioneffects only!
    Example: 'potioneffect:STRENGTH#1#600' <- This would add a strength II potion effect which would last 10 minutes.
    • Here you can find a list of Potion effect types: Link
    • The setup tool allows to choose between the existing potion effect types quickly


    playerhead:<name>
    This allows you to set the name of skulls. IMPORTANT: You can only use this attribute on skulls ("SKULL_ITEM").
    Example: 'playerhead:Herobrine' <- This would transform the skull into a Herobrine head. IMPORTANT: In order to get Playerheads you need to set the material to SKULL_ITEM ("type:SKULL_ITEM") AND the durability has to be 3 ("durability:3").


    customskull:<texture/mojang skin url>
    This allows you to give skulls custom and fix textures which do not change when a player changes his skin. Once loaded by the client of the player these textures will stay loaded and are instantly displayed whenever the player re-opens the shop. You can find textures here: Link. Simply click a head and copy the texture value that is contained in the resulting string.


    mobspawner:<mob id/name>
    Allows you to make your item a working mobpawner with a pre-set mobtype. Requires the plugin SilkSpawners or EpicSpawners.
    • List of available entity ids: Link
    • List of available entity names: Link
    Dirty workaround without using SilkSpawners/EpicSpawners: Use commands to give the player a pre-set mobspawner.


    monsteregg:<mob id/name>
    Allows making items a working monsteregg with a pre-set mobtype. Requires the plugin SilkSpawners.
    • List of available entity ids: Link
    • List of available entity names: Link
    Workaround without using SilkSpawners which might work when using older Spigot builds (Not guaranteed to work!): You can create working monstereggs without SilkSpawners aswell, however these only keep their entity-adapted color as long as they do not have a custom name or lore. In that case simply use "type:MONSTER_EGG" and "durability:<mob id>".


    hideflags:<flag1#flag2#flag3>
    Fast way to hide flags. Examples:
    • hideflags:all
    • hideflags:HIDE_ATTRIBUTES
    • hideflags:HIDE_ATTRIBUTES#HIDE_ENCHANTS
    • Here you get a list of available flag names: Link

    unbreakable

    Makes the item completely unbreakable. Useful for adventure maps for example. This feature only works on Spigot servers though.
    Code (Text):
        - unbreakable:true
    Code (Text):
        - unbreakable:true
        - name:&f[&9&l%shopitemname%&f]
    #Make Sure Its on top Of Item Name (Tested On Spigot)


    book:<title>#<author>
    Adds title and author name to a written book. Supports color codes and symbols.


    bookpage:<page>#<text>
    Adds text to the given book page. Can be used multiple times per page in order to force a new line.
    Code (Text):
        RewardType: ITEM
        Reward:
        - - type:WRITTEN_BOOK
          - amount:1
          - 'book:&lExample Book#&6Black_ixx'
          - bookpage:1#Hello World. This is some text at page 1.&0
          - bookpage:1#&0
          - bookpage:1#&0Color codes:&0
          - bookpage:1#&0&11 &22 &33 &44 &55 &66 &77 &88 &99 &00 &aa &bb &cc &dd &ee &ff&r &kk&r &ll&r &mm&r &nn&r &oo&r &rr&0
          - bookpage:1#&0
          - bookpage:1#&0
          - bookpage:1#&0
          - bookpage:1#&0
          - bookpage:1#&0
          - bookpage:1#&0
          - bookpage:1#&0
          - bookpage:1#&0End of page 1.
          - bookpage:2#&4&l&nRules&0
          - bookpage:2#&0- Do not &csteal&0
          - bookpage:2#&0- Do not &cspam&0
          - bookpage:2#&0- Do not &cgrief&0
          - bookpage:2#&0- Be friendly&0
          - bookpage:3#&l&nShop introduction&0
          - bookpage:3#&0
          - bookpage:3#&0Use '&1/shop&0' in order to open the server shop menu.
    Output:
    [​IMG]

    [​IMG]

    [​IMG]


    banner:<>
    Feature already implemented. Guide cooming soon




    Check out the default shops or the Configuration guide in order to find out more about ItemData.


    Item Comparison: Limiting what items players can sell to receive a certain reward (when the price is items).
  • Loading...
  • Loading...