# Katton.pick / pickMany

### `Katton.pick`

```csharp
Katton.pick(list)
```

returns one random element from a list, or `null` if the list is empty

```csharp
val colors = ["red", "blue", "lime", "yellow"]
val chosen = Katton.pick(colors)

Katton.log.info("chosen color: " + chosen)
```

always consider that the pick could potentially return something empty

### `Katton.pickMany`

```csharp
Katton.pickMany(list, amount)
```

returns up to `amount` **unique** random elements (never duplicates)

```csharp
val allPlayers = Katton.players.all()
val winners = Katton.pickMany(allPlayers, 3) // pick 3 random winners, or fewer if there arent 3 players

for (winner in winners) {
    winner.sendMessage("&6you won!")
}
```
