2019-09-07 04:23:15 +00:00
|
|
|
export namespace server {
|
2020-01-15 08:48:18 +00:00
|
|
|
/**
|
|
|
|
* Runtime ServerType
|
|
|
|
*/
|
2019-09-07 04:23:15 +00:00
|
|
|
export const ServerType = Symbol("ServerType");
|
2020-01-15 08:48:18 +00:00
|
|
|
/**
|
|
|
|
* Runtime Console
|
|
|
|
*/
|
2019-09-07 04:23:15 +00:00
|
|
|
export const Console = Symbol("Console");
|
2020-01-15 08:48:18 +00:00
|
|
|
/**
|
|
|
|
* MiaoScript Server
|
|
|
|
*/
|
2019-11-04 12:18:30 +00:00
|
|
|
export const Server = Symbol("Server");
|
2020-01-15 08:48:18 +00:00
|
|
|
/**
|
|
|
|
* Runtime Server Instance
|
|
|
|
*/
|
|
|
|
export const ServerInstance = Symbol("ServerInstance");
|
|
|
|
/**
|
|
|
|
* MiaoScript Server
|
|
|
|
*/
|
2019-11-04 12:18:30 +00:00
|
|
|
export interface Server {
|
|
|
|
getVersion(): string;
|
|
|
|
getPlayer(name: string): any;
|
2020-01-14 09:44:20 +00:00
|
|
|
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;
|
2019-11-04 12:18:30 +00:00
|
|
|
}
|
2019-09-07 04:23:15 +00:00
|
|
|
}
|