Skip to content

Creating Cosmin Item

sachin edited this page Aug 9, 2021 · 11 revisions

This page will explain you how to create a cosmin item and all options to configure it

These items are created under plugins/Cosmin/items folder, in YAML syntax. You can make any number of files in the Items folder, and they can be named anything you like as long as the file ends in .yml. items folder also contain a example-items.yml which we will examine to understand the items syntax.

these are all options available to create a item

internal_itemname:
    id:
    type:
    hide:
    cost:
    points:
    amount:
    damage:
    display:
    lore:
    permission:
    options:
    enchantments:
    flags:
    firework:

Breaking down the options

  • internal_itemname:

    • This string will determine how your item is referenced internally in Cosmin which will be used in commands and making sets
    • Must be alphanumerical and is case sensitive with no spaces allowed.
  • id:

    • this is the id or Material type for item
    • the string should all be in capital letters
    • All valid item id can be found on here Example: id: DIAMOND_HELMET
  • type:

    • this determines which wardrobe slot this item will go in
    • valid slot types are HEAD,CHEST,LEGS,FEET,OFFHAND
    • defaults to HEAD if not used
  • hide:

    • this option is usefull for creating items for set only
    • if set to true the item will not be shown in wardrobe gui
  • points:

    • Requires PlayerPoints plugin
    • the amount of points required to buy the item or set, can be used with cost option
  • cost:

    • what should be the cost of item when in shop menu (this option requires vault and economy plugin like Essentials or CMI)
  • display:

    • this string determines the display name of item
    • supports color codes
      Example: display: "&cFancy Helmet"
  • damage:

    • how much damage the item has taken
  • amount:

    • count of item
  • lore:

    • this is a list of strings which determines lore of given item
    • supports color codes
      Example:
    lore:
    - "&aLine 1"
    - "&7Line 2"
  • permission:

    • if permission string is used, player requires the specified permission to view the item in respective wardrobe slot
      Example: permission: perm.vip
  • flags:

    • list of item flags the given item item will have
    • valid flags can be found here
    • ALL can be used to apply all itemflags at once
      Example:
    flags: 
    - HIDE_ENCHANTS
  • firework:

    • only valid for FIREWORK_STAR item
    • list of Colors to be applied to star
      Example:
    firework:
      color:
      - RED
      - BLUE
      - YELLOW
  • enchantments:

    • list of enchantments with level to be applied for given item
    • valid enchantment names can be found here
      Example:
    enchantments:
      DIG_SPEED: 1
      MENDING: 1
  • options:

    • this is a special section which comes with various sub-options, some are only valid for specific material types
    • all available options are given below
    • model:
      • CustomModelData data value for given item
    • enchanted:
      • if set to true the item will have an enchanted item type glint
    • color:
      • valid for potions and leather armor
      • valid color can be either RGB like 100,100,100 value or
        Color like RED value
    • texture:
      • valid only for PLAYER_HEAD item
      • sets the texture of player head
      • takes a base64 value which can be found in value section of minecraft-heads.com site Value
    • patterns:
      • only valid for SHIELD and BANNER items
      • takes PatternType and DyeColor as key value pair to apply the pattern
        Example: the pattern given bellow will create the banner pattern with white as base color and red mojang logo
      options:
        patterns:
          BASE: WHITE
          MOJANG: RED

Examples

Cherry-helmet:
  id: NETHERITE_HELMET
  hide: true
  flags:
    - ALL
  display: "&cCherry Helmet"
  options:
    model: 1

Crimson-Shield:
  id: SHIELD
  hide: true
  display: "&cCrimson Shield"
  options:
    patterns:
      BRICKS: RED

Clone this wiki locally