refactor: chat & command tabComplete
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
@ -13,6 +13,9 @@ export class SpringCommand extends command.Command {
|
||||
protected create(plugin: any, command: string) {
|
||||
return this.commandMap.register(plugin, command)
|
||||
}
|
||||
public tabComplete(sender: any, input: string, index?: number): string[] {
|
||||
return this.commandMap.tabComplate(sender, input, index)
|
||||
}
|
||||
protected remove(plugin: any, command: string) {
|
||||
this.commandMap.unregister(plugin, command)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { server } from '@ccms/api'
|
||||
import { provideSingleton, inject } from '@ccms/container'
|
||||
import { NativePluginManager } from '@ccms/api/dist/interfaces/server/native_plugin'
|
||||
import { NativePluginManager } from '@ccms/api'
|
||||
import { CommandMap } from './internal/command'
|
||||
|
||||
@provideSingleton(server.Server)
|
||||
@ -8,8 +8,6 @@ export class SpringServer implements server.Server {
|
||||
@inject(CommandMap)
|
||||
private commandMap: CommandMap
|
||||
|
||||
constructor() {
|
||||
}
|
||||
getVersion(): string {
|
||||
return "SpringFramework"
|
||||
}
|
||||
@ -47,10 +45,4 @@ export class SpringServer implements server.Server {
|
||||
getRootLogger() {
|
||||
return Packages.org.slf4j.LoggerFactory.getLogger("root") || global.logger
|
||||
}
|
||||
sendJson(sender: any, json: string | object): void {
|
||||
throw new Error("Method not implemented.")
|
||||
}
|
||||
tabComplete(sender: any, input: string, index?: number) {
|
||||
return this.commandMap.tabComplate(sender, input, index)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user