About YAML (YML files)

You break it. You fix it.

YAML has very specific syntax spacing and does NOT tolerate any misplaced/missing spaces/symbols! Validate it!

When editing your YML files, please make sure you adhere to YAML's very specific syntaxing and formatting outside of any double-quoted-text lines.

YAML Formatting:

  • There will be a SPACE after any : character and the following value

  • Every 'Indent' level you see in the file is TWO SPACES for every level. (NO Tab)

  • Any line that begins with a # is a comment and will be ignored by the plugin

  • if you encounter any errors after altering your file, or are new to editing these files. USE AN ONLINE YAML PARSER to validate your file!. It will immediately identify any formatting errors that you will need to fix before proceeding

Common errors:

  • Bad spacing: (does not conform to even-numbered-space-character-indenting)

  • Missing space: after an expected value a space is missing.

    • ex (displayname:"<Missing Space Between The Colon And Double Quotes")

  • Missing 'block end/start': you forgot to surround the value with double-quotes somewhere

  • Absolutely NO TAB characters

Quick Explanation for each file:

Shops Files:

spacing for files in the shops folder:

  • 0 (ZERO) spaces before initial page declaration

  • 2 (TWO) spaces before the page number

  • 4 (FOUR) spaces before gui-rows setting and the items declaration

  • 6 (SIX) spaces before the items ID

  • 8 (EIGHT) spaces before the items properties

pages: #No spaces for the page declaration
  page1: #Two spaces for the page number
    gui-rows: 6 #Four spaces for the gui-rows item declaration
    items:
      '1': #Six spaces for the items themselves
        material: BOOKSHELF #Eight spaces for the items properties
        buy: 119.12
        sell: 29.78
      '2':
        material: HAY_BLOCK
        buy: 47.25
        sell: 11.82
#Etc, and so on...

Sections Files:

spacing for files in the sections folder:

enable: true
slot: 19
title: ''
hidden: false
sub-section: false
display-item: false
fill-item:
  material: AIR
nav-bar:
  mode: INHERIT
item:
  material: GRASS_BLOCK
  displayname: '&2&lBlocks'
  name: '&2&lBlocks'

Config.yml:

Spacing for config.yml:

'Full' Technical Explanation: (it's complicated. and simple)

#Shops file example:
#The first level in a YAML file will have ZERO spaces before it
####The shop section CANNOT HAVE SPACES in it, but can use _ underscores.
####The shop section MUST MATCH EXACTLY with what you have defined in the sections.yml for it.
Armor: #nothing follows the : after this field. It is a header for subsequent settings/items
  #The next level has TWO SPACES before it. These lines are sub-parts of the defined value above (Armor)
  ####(shops.yml specifc) Note: ESGUI does not require the following value to be numerical. you can use words and most characters. 
  ####This is the <index/item> that will be used with the /shopedit command. 
  ####It is reccomended to use numbers in 1.12 and lower, 
  ####1.13+ has command-tab-complete that can assist in filling out the command, and naming your items here can be helpfull in this case.

  '1': #again, nothing follows the : becasue it is the defieing valuse for the parts that follow...
  #
    #options are another level below the index/item, and have an additional two spaces fro mthe above line. 
    #This line has FOUR SPACES before it.
    material: GRASS_BLOCK 
      #There must be a space immediately after the : , Then a SINGLE SPACE, followed by the defined value.
      #Double quotes around the value are only required for values with special characters and spaces
    #still at FOUR SPACES as these options are more values for item '1'      
    buy: 20
    #### setting the value to a NEGATIVE number in either buy or sell will disable that option 'item cannot be bought/sold'
    sell: -1
    lore: #List lines start like a new sub-level, but use a - to define the start of each line in the list
    #in this case we are expecting lines of text, so we MUST enclose them with double-quotes ""
    #if you want to use double-quotes IN your line of text, you MUST 'Escape' it by printing it TWICE. (must still start and end with double-quotes)
    ####Minecraft chat color codes are supported
    - "example lore"
    - "&c""Second"" line of lore"
    enchantments:
    #another list-foramt is an array. mainly used for enchantments in ESGUI. 
    #it uses the Enchantment_name immediately followed by a : and again immediately followed by the enchantment level
    - EFFICIENCY:5 
    - FORTUNE:3

Last updated