UNPKG

@throw-out-error/minecraft-mcfunction

Version:

A simple way to create your mcfunction files using Typescript syntax.

34 lines (33 loc) 1.33 kB
import { Argument, ArgumentObject } from '../arguments'; declare const NAME: unique symbol; declare const ARGUMENTS: unique symbol; export declare abstract class Command<T extends keyof CommandContext = keyof CommandContext, U extends Argument[] = Argument[]> extends ArgumentObject { static readonly NAME: typeof NAME; static readonly ARGUMENTS: typeof ARGUMENTS; readonly [NAME]: T; readonly [ARGUMENTS]: U; /** * @param {CommandName} name the command to be executed * @param {Argument[]} args the parameters to be passed to the command */ constructor(name: T, args?: U); compile(): AsyncGenerator<string, void, unknown>; /** * @deprecated Use compile instead */ toString(): string; static commands: CommandContext; static registerCommand<T extends keyof CommandContext>(name: T, cmd: CommandContext[T]): void; } export * from './java/advancement'; export * from './java/clear'; export * from './java/datapack'; export * from './java/difficulty'; export * from './java/effect'; export * from './java/execute'; export * from './java/function'; export * from './java/gamemode'; export * from './java/give'; export * from './java/kill'; export * from './java/say'; export * from './java/scoreboard'; export * from './java/summon';