mirror of
https://github.com/GayPizzaSpecifications/foundation.git
synced 2025-08-03 13:31:32 +00:00
Add missing alias and try to improve tab completion.
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
package cloud.kubelet.foundation.core.features.player
|
||||
|
||||
import org.bukkit.GameMode
|
||||
import org.bukkit.WeatherType
|
||||
import org.bukkit.command.Command
|
||||
import org.bukkit.command.CommandExecutor
|
||||
@ -45,6 +44,7 @@ class LocalWeatherCommand : CommandExecutor, TabCompleter {
|
||||
args: Array<out String>
|
||||
): List<String> = when {
|
||||
args.isEmpty() -> weatherTypes.keys.toList()
|
||||
args.size == 1 -> weatherTypes.filterKeys { it.startsWith(args[0]) }.keys.toList()
|
||||
else -> listOf()
|
||||
}
|
||||
}
|
||||
|
@ -60,3 +60,5 @@ commands:
|
||||
localweather:
|
||||
description: Set the player's local weather in the client.
|
||||
usage: /localweather <type>
|
||||
aliases:
|
||||
- lw
|
||||
|
Reference in New Issue
Block a user