Add missing alias and try to improve tab completion.

This commit is contained in:
Logan Gorence
2022-01-10 00:04:08 -08:00
parent 203ecd1ca9
commit 4187b0f50c
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,5 @@
package cloud.kubelet.foundation.core.features.player package cloud.kubelet.foundation.core.features.player
import org.bukkit.GameMode
import org.bukkit.WeatherType import org.bukkit.WeatherType
import org.bukkit.command.Command import org.bukkit.command.Command
import org.bukkit.command.CommandExecutor import org.bukkit.command.CommandExecutor
@ -45,6 +44,7 @@ class LocalWeatherCommand : CommandExecutor, TabCompleter {
args: Array<out String> args: Array<out String>
): List<String> = when { ): List<String> = when {
args.isEmpty() -> weatherTypes.keys.toList() args.isEmpty() -> weatherTypes.keys.toList()
args.size == 1 -> weatherTypes.filterKeys { it.startsWith(args[0]) }.keys.toList()
else -> listOf() else -> listOf()
} }
} }

View File

@ -60,3 +60,5 @@ commands:
localweather: localweather:
description: Set the player's local weather in the client. description: Set the player's local weather in the client.
usage: /localweather <type> usage: /localweather <type>
aliases:
- lw