List command

This commit is contained in:
creeper123123321 2021-03-28 19:35:28 -03:00
parent a0eef99492
commit 5eb58c22f5
4 changed files with 18 additions and 2 deletions

View File

@ -3,7 +3,7 @@ package com.github.creeper123123321.viaaas.command
import us.myles.ViaVersion.api.command.ViaCommandSender
object EndCommand : Command {
override val info = "Stops VIAaaS"
override val info = "Alias of 'viaaas stop'"
override fun suggest(sender: ViaCommandSender, alias: String, args: List<String>): List<String> {
return emptyList()
}

View File

@ -0,0 +1,15 @@
package com.github.creeper123123321.viaaas.command
import us.myles.ViaVersion.api.command.ViaCommandSender
object ListCommand : Command {
override val info = "Alias of 'viaaas connections'"
override fun suggest(sender: ViaCommandSender, alias: String, args: List<String>): List<String> {
return emptyList()
}
override fun execute(sender: ViaCommandSender, alias: String, args: List<String>) {
ViaAspirinCommand.execute(sender, alias, listOf("connections"))
}
}

View File

@ -25,6 +25,7 @@ object VIAaaSConsole : SimpleTerminalConsole(), ViaCommandSender {
commands["?"] = HelpCommand
commands["end"] = EndCommand
commands["reload"] = ReloadCommand
commands["list"] = ListCommand
}
override fun buildReader(builder: LineReaderBuilder): LineReader {

View File

@ -8,7 +8,7 @@ import us.myles.ViaVersion.api.command.ViaCommandSender
import us.myles.ViaVersion.commands.ViaCommandHandler
object ViaAspirinCommand : ViaCommandHandler(), Command {
override val info = "ViaVersion commands"
override val info = "ViaVersion command"
init {
registerSubCommand(StopSubCommand)