datapack-manager
Version:
Manage your Minecraft datapacks
30 lines (29 loc) • 1.17 kB
TypeScript
import World from "./world";
import { Datapack } from "@throw-out-error/minecraft-datapack";
declare type InstallOptions = Parameters<World["install"]>[1];
export interface SearchResult {
path: string;
datapack: Datapack;
name: string;
world?: string;
symlink?: false | string;
global?: boolean;
}
declare type SearchOptions = {
name?: string | RegExp;
world?: string;
here?: boolean;
global?: boolean;
installed?: boolean;
};
export declare class DatapackManager {
install(name: string, world: World | string, opts?: InstallOptions): Promise<void>;
/**@param {string} path absolute path of the datapack */
install(path: string, world: World | string, opts?: InstallOptions): Promise<void>;
install(datapack: Datapack, world: World | string, opts?: InstallOptions): Promise<void>;
uninstall(name: string, world: World | string): Promise<void>;
/**@param {string} path absolute path of the datapack */
uninstall(path: string, world: World | string): Promise<void>;
search({ name, world, here, global, installed }?: SearchOptions): Promise<SearchResult[]>;
}
export {};