blob: 752fae49c1d685af74efaaf193396ba557184551 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package cat.freya.khs.command
import cat.freya.khs.Khs
import cat.freya.khs.command.util.Command
import cat.freya.khs.player.Player
import cat.freya.khs.runChecks
class KhsLeave : Command {
override val label = "leave"
override val usage = listOf<String>()
override val description = "Leaves the game lobby"
override fun execute(plugin: Khs, player: Player, args: List<String>) {
runChecks(plugin, player) { playerInGame() }
plugin.game.leave(player.uuid)
}
override fun autoComplete(plugin: Khs, parameter: String, typed: String): List<String> {
return listOf()
}
}
|