#YAML Error.

1 messages · Page 1 of 1 (latest)

random anvil
#

You can't map subfields to a parent with a value using that syntax

signal grove
#

so I would just not make it a parent

random anvil
#
ThisIsValid:
  example1: true
  example2: 'example_value'
#
ThisIsNotValid: 'because of this'
  example1: true
  example2: 'example_value'
#

so in your case, an example would be this

#
message:
  must_be_player_error: 'You must be a player to execute this command!'
  no_permission_error: '&cYou do not have permission to execute this command!'
kitselector:
  kit_knight: '&e&lKIT KNIGHT'
  example_parent:
   lore1: 'Lore 1'
   lore2: 'Lore 2'
permissions:
  kit_command: 'permission.kitcommand'
  reload_config: 'permission.reload_config'
signal grove
#

So I can put

random anvil
#

but I added an arbitrary parent ("example_parent"), so it probably won't be valid within your use case

signal grove
#
message:
  must_be_player_error: 'You must be a player to execute this command!'
  no_permission_error: '&cYou do not have permission to execute this command!'
kitselector:
  kit_knight: '&e&lKIT KNIGHT'
  kit_knight_lore:
   lore1: 'Lore 1'
   lore2: 'Lore 2'
permissions:
  kit_command: 'permission.kitcommand'
  reload_config: 'permission.reload_config'
#

this would be good?

random anvil
#

Yes; that is valid

signal grove
#

Thank you friend. Extremly helpful

random anvil
#

np!

signal grove
#

Are you still here?

#

@random anvil

random anvil
#

Somewhat?

signal grove
#

It worked..

#

kind of

#

It gave me the second lore on the item

#

so 'Lore 2'

#

but not the first one

random anvil
#

Probably easier just to use a list

signal grove
#

I'm kind of a beginner, so I dont really know how to do that, let alone use a list with config

random anvil
#
message:
  must_be_player_error: 'You must be a player to execute this command!'
  no_permission_error: '&cYou do not have permission to execute this command!'
kitselector:
  kit_knight: '&e&lKIT KNIGHT'
  kit_knight_lore:
   - 'Lore 1'
   - 'Lore 2'
permissions:
  kit_command: 'permission.kitcommand'
  reload_config: 'permission.reload_config'
signal grove
#

would I need to change any code?

random anvil
#

Depends on how you are working with the yaml