yoni-mcscripts-lib
Version:
为 Minecraft Script API 中的部分接口创建了 wrapper,并提供简单的事件管理器和任务管理器,另附有一些便于代码编写的一些小工具。
34 lines (33 loc) • 1.91 kB
TypeScript
export class ChatCommand {
static set defaultPrefix(arg: string);
static get defaultPrefix(): string;
static receiveBeforeChatEvent(event: any): void;
/**
* @param {string} prefix
* @param {string} command
* @param {(sender: import("../types").YoniPlayer, rawCommand:string, label:string, args:string[])=>void} executor
*/
static registerPrefixCommand(prefix: string, command: string, executor: (sender: import("../types").YoniPlayer, rawCommand: string, label: string, args: string[]) => void, ...args: any[]): void;
/**
*
* @param {string} command
* @param {(sender: import("../types").YoniPlayer, rawCommand:string, label:string, args:string[])=>void} executor
*/
static registerCommand(command: string, executor: (sender: import("../types").YoniPlayer, rawCommand: string, label: string, args: string[]) => void): void;
static unregisterCommand(command: any): void;
/**
* @param {string} command
* @param {(sender: import("../types").YoniPlayer, rawCommand:string, label:string, args:string[])=>void} executor
*/
static registerNonPrefixCommand(command: string, executor: (sender: import("../types").YoniPlayer, rawCommand: string, label: string, args: string[]) => void): void;
static unregisterNonPrefixCommand(command: any): void;
/**
* @param {string} prefix
* @param {string} command
* @param {(sender: import("../types").YoniPlayer, rawCommand:string, label:string, args:string[])=>void} executor
*/
static registerCustomPrefixCommand(prefix: string, command: string, executor: (sender: import("../types").YoniPlayer, rawCommand: string, label: string, args: string[]) => void): void;
static unregisterCustomPrefixCommand(prefix: any, command: any): void;
static "__#6@#invokeCommand"(options: any): void;
static getParameters(commandContent: any): string[];
}