Skip to content

Commit

Permalink
feat: function improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
27rogi committed Dec 28, 2022
1 parent a406e1d commit fbca62d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/kotlin/space/rogi27/homabric/helpers/Completables.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ import net.minecraft.server.network.ServerPlayerEntity
import space.rogi27.homabric.config.HomesConfig
import space.rogi27.homabric.objects.PlayerObject
import java.util.concurrent.CompletableFuture
import java.util.function.BiConsumer
import java.util.function.Consumer

object Completables {
fun suggestPlayers(context: CommandContext<ServerCommandSource>, builder: SuggestionsBuilder): CompletableFuture<Suggestions> {
HomesConfig.getPlayers().forEach(BiConsumer { name: String?, _: PlayerObject? ->
HomesConfig.getPlayers().forEach { (name: String?, _: PlayerObject?) ->
builder.suggest(name)
})
}
return builder.buildFuture()
}

Expand Down

0 comments on commit fbca62d

Please sign in to comment.