[fix] UUID request spam

This commit is contained in:
Xiaro 2021-01-06 23:01:48 -05:00
parent d0f54cf435
commit 7a3cb505a8
No known key found for this signature in database
GPG Key ID: 996D265D6E155377
2 changed files with 5 additions and 1 deletions

@ -1 +1 @@
Subproject commit 3354e4fde4aa0d37eb7d8c25324a65d3538f4289
Subproject commit c9be6984ec7f6aba0dcf0b5ea3abe3d1004e4ee6

View File

@ -148,6 +148,10 @@ class PlayerArg(
override val name: String
) : AbstractArg<PlayerProfile>(), AutoComplete by DynamicPrefixMatch(::playerInfoMap) {
override suspend fun checkType(string: String?): Boolean {
return !string.isNullOrBlank()
}
override suspend fun convertToType(string: String?): PlayerProfile? {
return UUIDManager.getByString(string)
}