UNPKG

bedrock-development

Version:

APIs for creating and editing files related to Minecraft Bedrock development.

17 lines (16 loc) 628 B
var _a; import { chalk } from "../../utils.js"; import { MinecraftWorld } from "../../types/index.js"; import { CommandMap } from "../command_map.js"; CommandMap.addCommand("root.world.list", { parent: (_a = CommandMap.getCommandEntry("root.world")) === null || _a === void 0 ? void 0 : _a.command, commandOptions(command) { command .name("list") .description("list installed worlds"); }, commandAction: triggerWorldsList, }); function triggerWorldsList() { MinecraftWorld.getAllWorlds().forEach((world, index) => console.log(`[${index}] ${chalk.green(`${world.Name}`)}`)); }