33
packages/api/src/interfaces/server/index.ts
Normal file
33
packages/api/src/interfaces/server/index.ts
Normal file
@ -0,0 +1,33 @@
|
||||
export namespace server {
|
||||
/**
|
||||
* Runtime ServerType
|
||||
*/
|
||||
export const ServerType = Symbol("ServerType");
|
||||
/**
|
||||
* Runtime Console
|
||||
*/
|
||||
export const Console = Symbol("Console");
|
||||
/**
|
||||
* MiaoScript Server
|
||||
*/
|
||||
export const Server = Symbol("Server");
|
||||
/**
|
||||
* Runtime Server Instance
|
||||
*/
|
||||
export const ServerInstance = Symbol("ServerInstance");
|
||||
/**
|
||||
* MiaoScript 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;
|
||||
getPluginsFolder(): string;
|
||||
getNativePluginManager(): NativePluginManager;
|
||||
sendJson(sender: string | any, json: object | string): void;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user