fix: sponge command dispatch error
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
0667201605
commit
7962aa5da0
@ -35,10 +35,10 @@ export class SpongeServer extends server.ReflectServer {
|
|||||||
if (typeof sender === 'string') {
|
if (typeof sender === 'string') {
|
||||||
sender = this.getPlayer(sender)
|
sender = this.getPlayer(sender)
|
||||||
}
|
}
|
||||||
return Sponge.getCommandManager().process(sender, command).getQueryResult().get() != 0
|
return Sponge.getCommandManager().process(sender, command).getSuccessCount().get() != 0
|
||||||
}
|
}
|
||||||
dispatchConsoleCommand(command: string): boolean {
|
dispatchConsoleCommand(command: string): boolean {
|
||||||
return Sponge.getCommandManager().process(Sponge.getServer().getConsole(), command).getQueryResult().get() != 0
|
return Sponge.getCommandManager().process(Sponge.getServer().getConsole(), command).getSuccessCount().get() != 0
|
||||||
}
|
}
|
||||||
getPluginsFolder(): string {
|
getPluginsFolder(): string {
|
||||||
return this.pluginsFolder
|
return this.pluginsFolder
|
||||||
@ -55,10 +55,4 @@ export class SpongeServer extends server.ReflectServer {
|
|||||||
getRootLogger() {
|
getRootLogger() {
|
||||||
return this.rootLogger
|
return this.rootLogger
|
||||||
}
|
}
|
||||||
sendJson(sender: string | any, json: string): void {
|
|
||||||
if (typeof sender === "string") {
|
|
||||||
sender = this.getPlayer(sender)
|
|
||||||
}
|
|
||||||
sender.sendMessage(TextSerializers.JSON.deserialize(json))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user