# ISelections interface

> Every player's weapon selection in a session, as the server holds it: the layers set over it. The host sends each player their stack whenever it changes, and refuses the picks of a player whose selection is hidden or locked, so nothing here needs the client.

Namespace `EvilEngine.Api.Selection`, assembly `EvilEngine.Api`. Engine commit 4ff877b1.

```csharp
public interface ISelections
```

Every player's weapon selection in a session, as the server holds it: the layers set over it. The host sends each player their stack whenever it changes, and refuses the picks of a player whose selection is hidden or locked, so nothing here needs the client.

A Plugin reaches it through its context's [Selections](/docs/api/plugincontext#selections), where its layers are named `<id>:<name>` for it and go when it unloads. `just map-shot --selection-layer` drives it too.

```csharp
selections.Everyone.Set(new SelectionLayer("ctf:intro") { Locked = true });
selections.Of(holder)?.Set(new SelectionLayer("physgun") { Priority = SelectionLayer.Weapon, Scroll = false });
```

## Members

### Everyone (property)

```csharp
ISelection Everyone { get; }
```

The selection every player shares. A layer set here sits under each player's own of the same [priority](/docs/api/selectionlayer#priority).

### Of (method)

```csharp
ISelection? Of(PlayerId player)
```

One player's own selection, or `null` when that [PlayerId](/docs/api/playerid) isn't connected. Their layers reach only them, and go when they leave.
