Home > Enterprise >  I've checked everything in my YAML file and yet it gives me an error
I've checked everything in my YAML file and yet it gives me an error

Time:04-06

I'm writing a spigot plugin and in the config.yml, I get an error, this is the error:

 Caused by: org.yaml.snakeyaml.scanner.ScannerExcption: mapping values are not allowed here
    in string, line 3, column 16:
     MaintenanceMode: "false"
                    ^ 

This is the YAML file:

// Maintenance Mode

MaintenanceMode: "false"

// Prefix

Prefix: "&7[&eMaintenanceSystem&7]"

// The message displayed when a player joins the server while its under Maintenance

MaintenanceMessage: "&4ExampleMC | &eMaintenance"

// UUID of the players that can join the server while its under Maintenance

AllowedPlayers:
  - ""

Can anyone tell me what's causing the error and how to fix it? I've tried everything I knew I could do

CodePudding user response:

Your first line should be exactly this:

---

"The file starts with three dashes. These dashes indicate the start of a new YAML document." -- source

CodePudding user response:

Comments in YAML should start with #
See: YAML - Comments

# Maintenance Mode
MaintenanceMode: "false"

# Prefix
Prefix: "&7[&eMaintenanceSystem&7]"

# The message displayed when a player joins the server while its under Maintenance
MaintenanceMessage: "&4ExampleMC | &eMaintenance"

# UUID of the players that can join the server while its under Maintenance
AllowedPlayers:
  - ""
  • Related