-
Notifications
You must be signed in to change notification settings - Fork 0
ConfigType
MDT168 edited this page Aug 17, 2026
·
2 revisions
The ConfigType class defines where a config file is saved and sets up optional header comments at the top of the file.
Creates a config type with a file path and header comments.
-
extraPath: The relative path for the config file. The library automatically adds"configs/"to the start of this path. -
prefix: Text to place at the top of the file as a comment, ornullif you do not want a header. Every line is automatically turned into a comment starting with#and ends with a blank line.
Creates a config type with a file path and no header comments.
-
extraPath: The relative path for the config file. The library automatically adds"configs/"to the start of this path.
Example:
If you passed main_config.yml as the extraPath, your file will live in configs/main_config.yml inside your Plugin Data Folder
Gets the relative file path.
-
Returns: The path string starting with
"configs/".
Gets the formatted header comment string.
- Returns: The comment header string, or an empty string if no prefix was set.
Combines a base folder path with the config file path to get the full file location.
-
Parameters:
dataFolder- The main plugin folder path. -
Returns: A
Pathobject pointing to the full file location.