mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 18:05:51 -04:00
commands: disconnect, quit
This commit is contained in:
parent
8de97ec940
commit
8041df4d71
@ -13,15 +13,12 @@
|
||||
|
||||
package de.bixilon.minosoft.terminal.commands
|
||||
|
||||
import de.bixilon.minosoft.terminal.commands.connection.ActionCommand
|
||||
import de.bixilon.minosoft.terminal.commands.connection.DebugCommand
|
||||
import de.bixilon.minosoft.terminal.commands.connection.QueryCommand
|
||||
import de.bixilon.minosoft.terminal.commands.connection.SayCommand
|
||||
import de.bixilon.minosoft.terminal.commands.connection.*
|
||||
import de.bixilon.minosoft.terminal.commands.rendering.ReloadCommand
|
||||
|
||||
object Commands {
|
||||
val COMMANDS: List<Command> = listOf(
|
||||
HelpCommand,
|
||||
HelpCommand, QuitCommand,
|
||||
ConnectionManageCommand,
|
||||
AccountManageCommand,
|
||||
ReloadCommand,
|
||||
@ -36,5 +33,6 @@ object Commands {
|
||||
SayCommand,
|
||||
ActionCommand, QueryCommand,
|
||||
DebugCommand,
|
||||
DisconnectCommand,
|
||||
)
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2023 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.terminal.commands
|
||||
|
||||
import de.bixilon.kutil.shutdown.ShutdownManager
|
||||
import de.bixilon.minosoft.commands.nodes.LiteralNode
|
||||
|
||||
object QuitCommand : Command {
|
||||
override var node = LiteralNode("quit", setOf("exit"), executor = { ShutdownManager.shutdown() })
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2022 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.terminal.commands.connection
|
||||
|
||||
import de.bixilon.minosoft.commands.nodes.LiteralNode
|
||||
|
||||
object DisconnectCommand : ConnectionCommand {
|
||||
override var node = LiteralNode("disconnect", setOf("leave"), executor = { it.connection.disconnect() })
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user