mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-11-04 09:30:00 +01:00
List command
This commit is contained in:
parent
a0eef99492
commit
5eb58c22f5
@ -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()
|
||||
}
|
||||
|
@ -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"))
|
||||
}
|
||||
}
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user