Overview
TheCreatorTools class (also exported as CreatorToolsHost) is the central application class that manages projects, storage, Minecraft connections, and overall application state for Minecraft Creator Tools.
Constructor
Creates a new CreatorTools instance with the required storage backends.Storage backend for application preferences and settings
Storage backend for project data
Array of storage backends for deployment targets (Bedrock, Education, etc.)
Storage backend for Minecraft worlds, or null if not available
Storage backend for behavior/resource packs, or null if not available
Storage backend for temporary working files, or null if not available
Root path for application content and assets
Properties
projects
Array of all loaded projects in the application
status
Array of status messages and operations from the application
activeOperations
Array of currently running operations
creator
The default creator/author name for new projects
formatBeforeSave
Whether to automatically format JSON files before saving
preferredTextSize
Preferred text size for the UI in pixels
editPreference
Default edit preference (raw JSON vs. visual editors)
track
Minecraft release track (main, preview, beta, etc.)
defaultDeploymentTargetType
Default deployment target (Bedrock, Education, etc.)
Methods
load
Loads application settings and project list from storage.Force reload even if already loaded
save
Saves application settings to storage.createNewProject
Creates a new project with the specified configuration.Name for the new project
Local file system path for the project
Folder object for the project
Display title for the project folder
Project focus type (general, world, gameplay, etc.)
Whether to include default starter files
Preferred scripting language (TypeScript or JavaScript)
The newly created project
createProjectFromFolder
Creates a project from an existing folder.Folder containing the project files
The created project
getProjectByName
Retrieves a project by its name.Name of the project to find
The project, or undefined if not found
deleteProjectByName
Deletes a project and all its files.Name of the project to delete
notifyStatusUpdate
Adds a status message to the application log.The status message
Topic category for the message
notifyOperationStarted
Notifies that a long-running operation has started.Description of the operation
Topic category for the operation
Operation ID for tracking
notifyOperationEnded
Notifies that a long-running operation has completed.ID returned from notifyOperationStarted
Completion message
Topic category
Whether the operation failed
runCommand
Executes a command in the application context.The command to execute
Project context for the command
loadGallery
Loads the gallery of sample projects and templates.The loaded gallery data
Events
onLoaded
Fired when the CreatorTools instance has loaded its configuration.onPropertyChanged
Fired when a property changes.onStatusAdded
Fired when a new status message is added.onOperationCompleted
Fired when an operation completes.Types
MinecraftTrack
DeploymentTargetType
CreatorToolsEditPreference
See Also
- Project - Project management API
- ProjectItem - Individual project file management
- Utilities - Utility functions