-
Notifications
You must be signed in to change notification settings - Fork 1
MCFunction
github-actions[bot] edited this page Jul 15, 2024
·
19 revisions
Remarks
A class for working with .mcfunction
files.
• new MCFunction(filepattern
): MCFunction
Name | Type | Description |
---|---|---|
filepattern |
string |
The filepattern used to find or create mcfunction files. |
Remarks
Creates a list of files from the filepattern. Note that if no files match the filepattern, a new file will be created in BP/functions
using the filepattern as a path.
• files: File
[]
Remarks
The mcfunction files handled by this class instance, as an array of Files.
▸ addCommand(commands
, options?
): void
Name | Type | Description |
---|---|---|
commands |
string [] |
A list of commands to add to the files. |
options? |
Object |
The mcfunction's comments at the top of the file, note these are only added if the file is empty. |
options.description |
string |
- |
options.selector? |
string |
- |
options.source? |
string |
- |
void
Remarks
Adds commands and optional comments.