Configuration Files - FrancoBM12/API-MagicCosmetics GitHub Wiki

Colors in text

both traditional color &1 and hex color #3341FF works

Config

license: '' #here is your license.
balloons-rotation: 25 #This number will depend on how fast or slow you want the balloon to spin. if you lower this number, it will go slower. if you raise it, it will go faster.
npc-rotation: 3 #this number works in ticks, and decides how many ticks the npc will rotate.
leave-wardrobe-gamemode: SURVIVAL #this causes the game mode to change to this one when you exit the wardrobe. if you wish to return to your previous gamemode, simply delete this path.
equip-message: true #this disables/enables the messages when a player equips a cosmetic.
save-on-quit: true #if this is activated the player's data will be saved when leaving the server, and if it is deactivated the player's data will be saved every time he/she interacts with cosmetics (equip, unequip).
bossbar-color: YELLOW #here you can change the bossbar color in case you are already using the yellow one. Colors -> RED, BLUE, GREEN, YELLOW, PURPLE, PINK, LIGHT_BLUE, WHITE
bungeecord: false #If you have a proxy, activate this option.
permissions: false #activates permissions on cosmetics.
spray-key: SHIFT_F # in 1.8.0 - 'SHIFT_F', 'SHIFT_Q'(you must have an item in hand for it to work.), 'SHIFT_LC' or 'SHIFT_RC'
spray-stay-time: 60 # in 1.8.0 - spray duration in ticks.
spray-cooldown: 5 #1.8.5 - in seconds
order-cosmetics: 0 #0 - order as the file is, #1 - alphabetical by id, #2 - random
MySQL:
  enabled: false
  host: "127.0.0.1"
  port: 3306
  user: "root"
  password: "password"
  table: "player_cosmetics"
  database: "magicosmetics"

Cosmetics

Cosmetics types: HAT, BAG, WALKING_STICK, BALLOON, SPRAY

cosmetics:
  test_balloon: #this will be the id of the cosmetic
    permission: 'cosmetics.test_balloon' #to use the permission, you must have the permissions option enabled in the config.
    item:
      display: '&btest balloon' #name that the cosmetic item will have
      texture: 'here' #in case your item is a head, you can choose the texture of the head with this path!
      material: LEATHER_HORSE_ARMOR #cosmetic material if you use ItemsAdder you can delete this path
      #if you use the ItemsAdder or Oraxen plugin you can just put the name of your item here and it will suffice
      item-adder: balloon #optional
      oraxen: balloon #optional
      lore: #lore of the item if you don't want it to have a lore you can delete the path
      - ''
      - '&cfirst'
      - ''
      unbreakable: true #select if the item will be unbreakable!
      glow: true #selects whether the item will have a glow effect.
      hide-attributes: true #select if the item will hide the attributes.
      modeldata: 10030 #here goes the model data of the item if the item is from the ItemsAdder or Oraxen plugin it will skip this.
      for-me: 10031 #Only BackPack - If this path is set, this item or modeldata will be displayed for the player who is using it, while the others will see the one that is already set. Remember, this path can use either number(modeldata) or id(itemsadder)
      color: '#004F71' #Set the default color of the cosmetic (in case you want one).
    colored: false #select if the cosmetic will be colorable
    type: BALLOON #select the type of cosmetic
    hide-menu: false #It will make the cosmetic visible or not in the menu.
    use-emote: false #This is used to specify if you want a cosmetic to be shown when using an ItemsAdder emote. By default it is disabled.
    #only for hats and canes.
    overlaps: true #This allows the cosmetic hat to show even if you are wearing a helmet.
    #only for backpacks.
    distance: 100 #distance to where the players can see the cosmetic.
    height: 3 #This is the height at which the backpack item will be set for the player himself.
    space: 1 #if the player's yaw exceeds this number the backpack disappears and if not it will not be visible again (only affects the client and not others) If you don't want the backpack to disappear when its yaw changes, delete this path or leave it at 0.
    #only for balloons:
    meg: #The model id of the Model Engine plugin. Attention: This will only be seen while you have the balloon equipped, that is, it will not replace the item nor will it be seen in the gui!
      model: custom-model
      colorable-parts: #this is optional if you want all parts of the model to be painted remove this path
        - 'partid1'
        - 'partid2'
      animations: #this path is optional, if you do not set anything it will default to "walk" and "idle". 
        walk: animation-walk
        idle: animation-idle
    ia: #The model id of the ItemsAdder plugin. Attention: This will only be seen while you have the balloon equipped, that is, it will not replace the item nor will it be seen in the gui!
      model: custom-model
      colorable-parts: #It is not yet ready for ItemsAdder entities - this is optional if you want all parts of the model to be painted remove this path
        - 'partid1'
        - 'partid2'
      animations: #this path is optional, if you do not set anything it will default to "walk" and "idle". 
        walk: animation-walk
        idle: animation-idle
    space: 1 #here you can increase/decrease the height of the balloon
    big-head: true #This option changes the position of the balloon item from the head to the right hand.
    distance: 100 #distance to where the players can see the cosmetic.
    invisible-leash: true #If this option is active the balloon string will not be visible.
    rotation:
      enabled: false #select whether this globe will be able to rotate.
      type: RIGHT #RIGHT, UP, ALL(it's a crazy rotation.)
    #only for sprays:
    url: 'https://localhost/img_url.png' #here there are 2 options, you put a url of an image or you type the name of an image you have in plugins/MagicCosmetics/sprays/
    item-image: true #This applies to sprays that are items and not images (they do not require the path url). If this option is activated, it will take the item displayed in the menu as an image.

Menus

In the menus.yml file there are 3 sections, colors, items and menus each one we will see in this section.

Sections

Colors

Primary Colors
Hex Colors
the rows are represented in this way.
image

colors:
#Don't touch this if you don't know how to use it.
  rows:
    3:
      character: '' #this represents the spacing for the frame to fit properly.
      selected: '쌍,쌍,쌍,쌍,     쌍,          쌍,              쌍' #this represents the frames of the secondary colors in this row.
    4:
      character: '' #this represents the spacing for the frame to fit properly.
      selected: '쌍,쌍,쌍,쌍,쌍,     쌍,          쌍' #this represents the frames of the secondary colors in this row.
    5:
      character: '' #this represents the spacing for the frame to fit properly.
      selected: '쌍,쌍,쌍,쌍,쌍,쌍,     쌍' #this represents the frames of the secondary colors in this row.
#Don't touch this if you don't know how to use it.
  test_color:
    primary-color: RED #The primary colors can be found up if you want a hex color you can use that too!
    select: '' #the frame of this color.
    with-row: true #this means that if you want to join the spacing of the path row with the frame of this color, it will calculate automatically depending on which slot it is in.
    secondary-colors: #colors are in hexadecimal format you can add as many as you want.
    - '#BD504A'
    - '#9D342E'
    - '#802824'
    slot: 3 #slot where the primary color item will be.

Items

these created items only work for menus (in case you want to create a custom menu)

items: #the format is the same as that of cosmetics.
  test-item:
    item:
      display: '&ctest item'
      material: DIAMOND_SWORD
      item-adder: cola #optional
      oraxen: cola #optional
      lore:
      - ''
      amount: 1
      glow: true
      modeldata: 8009

Attention the items that end in "-template" are necessary for the plugin to work without problems so do not delete those items ever!
Now, here I will show you some extras of the template items of the cosmetics:

In these templates you will have some variables that will be useful to identify them.
%name% -> gets the name of the cosmetic.
%available% -> gets the message depending on whether or not it is available (messages are located in messages.yml)
%type% -> get a message with the type of cosmetic (messages are in messages.yml)

  #this example only works with the following items hat-template, bag-template, wstick-template & balloon-template
  balloon-template:
    item:
      display: '%name%'
      material: PLAYER_HEAD #the material does not matter, it is replaced by the material of the cosmetic.
      lore-available: #will show this lore if you have the cosmetic.
      - '&6type: &7%type%'
      - '&available: %available%'
      lore-unavailable: #will show this lore if you don't have the cosmetic.
      - '&cYou do not have this cosmetic available!'
      - '&9See https://test.com'
      amount: 1
      glow: true
      modeldata: 10000

Menus

attention do not delete the inventories that come by default otherwise the plugin will not work!
Action Types: OPEN_MENU, CLOSE_MENU, PLAYER_COMMAND, CONSOLE_COMMAND

#OPEN_MENU
action:
  type: OPEN_MENU
  menu: <menu-id>
#CLOSE_MENU
action:
  type: CLOSE_MENU
  menu: skipping
#PLAYER_COMMAND
action:
  type: PLAYER_COMMAND
  commands:
    - 'tp RandomPlayer'
#CONSOLE_COMMAND
action:
  type: CONSOLE_COMMAND
  commands:
    - 'tp player RandomPlayer'
#Now you can use multiple actions!
action:
  types:
    - CONSOLE_COMMAND
    - CLOSE_MENU
  commands:
    - 'tp player RandomPlayer'
  #this example only works with menus: hat, bag, wstick & balloon
  balloon: #the menu id
    permission: 'menu.balloon' #this permission will decide whether the menu can be opened or not.
    title: '&f쌃' #the title supports both its own custom fonts and those of ItemsAdder and of Oraxen (in this case you can use the placeholders you set)
    size: 6 #the size of the gui minimum 1 and maximum 6
    type: BALLOON #the type of menu HAT, BAG, WALKING_STICK, FREE, BALLOON, SPRAY, COLORED, TOKEN - FREE_COLORED(NEW)
    start-slot: 19 #the slot where the list of cosmetics will start.
    end-slot: 43 #the slot where the list of cosmetics will end.
    pages-slot: -1 #the slot in which the pages item will be displayed set to -1 if you want to remove it from the gui.
    back-button-slot: 46 #slot where the back button will be displayed set to -1 if you want to remove it from the gui.
    next-button-slot: 52 #slot where the next button will be displayed set to -1 if you want to remove it from the gui.
    unavailable-slots: '0,1' #slots you want to skip within the start-slot and end-slot path
    #in the colored, free_colored and token menu there will be these two extra paths they are self explanatory.
    #
    preview-slot: 10
    result-slot: 16
    #

    #a new path added to the token menu.
    #this option allows dragging in the token menu.
    drag: true
    #

    #in the free color menu an extra path was added that compares the items you enter and
    #if it contains the lore and it is the same material it will let you paint it otherwise it will not.
    contains-item: 'test-item' #if you want any item to be paintable and not depend on the lore, set this to null
    #


    1: #id that can be called in any way only serves to add a new item with its respective action.
      slot: 1 
      item: hat_menu #here goes the id of the item inside the path "items"
      action:
        type: OPEN_MENU
        menu: hat
    2:
      slot: 3
      item: bag_menu
      action:
        type: OPEN_MENU
        menu: bag
      sound: test_sound #here you can put a sound with the id of the sounds.yml file
      permission: 'custom.permission' #this permission will be the one needed to click on the corresponding slot!
    3:
      slot: 5
      item: wstick_menu
      action:
        type: OPEN_MENU
        menu: wstick
    4:
      slot: 7
      item: balloon_menu
      action:
        type: OPEN_MENU
        menu: balloon

If you want to create more customizable menus use the FREE type.

Sounds

There's not much to explain in sounds.yml you can create as many sounds as you want, just don't delete the default sounds or you won't cause problems in the plugin! the sounds support those of bukkit like those of mc himself and resources pack

sounds:
  test_sound: #sound id
    type: BLOCK_GLASS_HIT #an example of sound with the itemsAdder plugin -> itemsadder:ambient.angelic
    yaw: 1.0
    pitch: 0.5

Tokens

tokens:
  test_token: #token id
    item: #the format is similar to that of cosmetics.
      display: '&btest token'
      amount: 1 #new in 1.5.2
      material: LEATHER_HORSE_ARMOR
      item-adder: token
      lore:
      - ''
      - '&cFirst lore'
      - ''
      unbreakable: true
      glow: true
      hide-attributes: true
      modeldata: 6124
    cosmetic: hat1 #the cosmetic you will get for redeeming this token.
    exchangeable: true #in 1.8.9 - If this is active the cosmetic to token exchange will work.
⚠️ **GitHub.com Fallback** ⚠️