Skip to content

Configuring Plugins

Beryl edited this page Feb 10, 2025 · 1 revision

⚙️ Configuring Plugins

Configuration files (or "Configs", as we often call them) are files generated automatically by the LabAPI that allow users to customize the experience for their servers.

  • Which settings exist, as well as how they affect plugins, is completely defined by the plugin's author(s) themselves.

Configs are stored next to plugins in the configs folder.

  • Windows - %appdata%\SCP Secret Laboratory\LabAPI\configs.
  • Linux - ~/.config/SCP Secret Laboratory/LabAPI/configs.

Tip

You should be able to copy-paste these paths in most File Explorers to directly navigate to the folder.

Configs generate on the first successful start up of a plugin. Upon which a folder with the plugin's name is generated containing any config files for that plugin.

Even if a plugin does not include any configs by default, a properties.yml config will be generated, which should contain a setting to easily toggle the plugin on/off.

Config Format

Configs are .yml (YAML) files, which means everything you do inside the config file must be in a valid YAML format.

Otherwise the config will not work, and an error will appear in the console.

Tip

We recommend using 3rd-party websites such as JsonFormatter's YAML Validator to verify if your file follows the right formatting.

Specially if you are editing large config files with possibly complex features such as arrays, lists, or even strings.

Resolving Failures

If a config fails to load, the plugin may fail to load or the plugin will use the default values for the config.

Here is an example of what it looks like on the Server console: alt text

Here we will teach you how to read this nerd-y block of text:

  • You may notice that a location is printed in this error message, in this case: YamlDotNet.Core.YamlException: (Line: 1, Col: 1, Idx: 0) - (Line: 1, Col: 7, Idx: 6): Exception during deserialization.
    • This line indicates that the system failed to understand what was written between line 1 char 1 (Line #1 & Character #1) and line 1 char 7 (Line #1 & Character #7).
    • If you cannot find the issue in said lines, consider dropping the file's contents on JsonFormatter's YAML Validator.
  • Should there still be errors whilst trying to load the config, we suggest temporarily renaming or deleting the config file. This will force the file to regenerate with the default values upon startup.

Clone this wiki locally