datapack-manager
Version:
Manage your Minecraft datapacks
31 lines (26 loc) • 834 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var _tslib = require('../_virtual/_tslib.js');
var index = require('../index.js');
const command = ["uninstall <pack> <world>", "u"];
const desc = "Uninstall a datapack";
function builder(yargs) {
return yargs;
}
function handler({ pack, world }) {
var _a;
return _tslib.__awaiter(this, void 0, void 0, function* () {
const manager = new index.DatapackManager();
try {
yield manager.uninstall(pack, world);
}
catch (e) {
console.error((_a = e === null || e === void 0 ? void 0 : e.message) !== null && _a !== void 0 ? _a : e);
}
});
}
exports.builder = builder;
exports.command = command;
exports.desc = desc;
exports.handler = handler;