2020-03-01 11:37:34 +00:00
|
|
|
import { NativePluginManager } from './native_plugin'
|
|
|
|
|
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;
|
2020-02-29 14:28:43 +00:00
|
|
|
getPluginsFolder(): string;
|
2020-03-01 07:19:43 +00:00
|
|
|
getNativePluginManager(): NativePluginManager;
|
2020-04-01 03:08:15 +00:00
|
|
|
getNettyPipeline(): any;
|
2020-05-15 07:48:38 +00:00
|
|
|
getRootLogger(): any;
|
2020-01-14 09:44:20 +00:00
|
|
|
sendJson(sender: string | any, json: object | string): void;
|
2020-05-26 07:53:41 +00:00
|
|
|
tabComplete?(sender: string | any, input: string, index?: number);
|
2019-11-04 12:18:30 +00:00
|
|
|
}
|
2019-09-07 04:23:15 +00:00
|
|
|
}
|