ms/packages/api/src/interfaces/server.ts
MiaoWoo 093a3dda00 feat: add server module
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-14 17:44:20 +08:00

16 lines
584 B
TypeScript

export namespace server {
export const ServerType = Symbol("ServerType");
export const Console = Symbol("Console");
export const Server = Symbol("Server");
export interface Server {
getVersion(): string;
getPlayer(name: string): any;
getOnlinePlayers(): any[];
getConsoleSender(): any;
getService(service: string): any;
dispatchCommand(sender: string | any, command: string): boolean;
dispatchConsoleCommand(command: string): boolean;
sendJson(sender: string | any, json: object | string): void;
}
}