UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

33 lines (32 loc) 1.49 kB
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.toggleInspectorCommand = exports.ToggleInspectorCommand = void 0; const IToolCommand_1 = require("../IToolCommand"); class ToggleInspectorCommand extends IToolCommand_1.ToolCommandBase { metadata = { name: "inspector", description: "Show how to open the project Inspector view", aliases: ["ti"], category: "Validation", requiresProject: true, isWriteCommand: false, examples: ["/inspector", "/ti"], }; async execute(context, _args, _flags) { if (!context.project) { context.output.error("No active project — open a project before running /inspector."); return this.error("NO_PROJECT", "No active project"); } context.output.info("Open the Inspector by clicking the Inspector tab in the project navigation pane " + "(or selecting Inspector from the Actions panel). Use /validate (alias /val) for a " + "quick error/warning/recommendation summary directly from this command bar."); return this.success("Displayed Inspector hint", { projectName: context.project.name, hint: "Click Inspector tab in project navigation", }); } } exports.ToggleInspectorCommand = ToggleInspectorCommand; exports.toggleInspectorCommand = new ToggleInspectorCommand();