> ## Documentation Index
> Fetch the complete documentation index at: https://docs.playtolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PlaytoliaParty

> Multiplayer lobby and matchmaking management

### Methods

| Method                           | Parameters             | Returns              | Notes                                    |
| -------------------------------- | ---------------------- | -------------------- | ---------------------------------------- |
| `CreateParty(maxSize, joinCode)` | `int = 4, bool = true` | `void`               |                                          |
| `JoinByCode(joinCode)`           | `string`               | `void`               |                                          |
| `AcceptInvite(inviteId)`         | `string`               | `void`               |                                          |
| `LeaveParty()`                   | —                      | `void`               | Leader leaving auto-transfers leadership |
| `InvitePlayer(playerId)`         | `string`               | `void`               | Any member                               |
| `SetReady(ready)`                | `bool`                 | `void`               |                                          |
| `KickMember(memberId)`           | `string`               | `void`               | Leader only                              |
| `TransferLeadership(memberId)`   | `string`               | `void`               | Leader only                              |
| `StartMatchmaking(queueName)`    | `string`               | `void`               | Leader only; queue from dashboard        |
| `CancelMatchmaking()`            | —                      | `void`               | Leader only                              |
| `IsInParty()`                    | —                      | `bool`               |                                          |
| `IsLeader()`                     | —                      | `bool`               |                                          |
| `IsMatchmaking()`                | —                      | `bool`               |                                          |
| `GetCurrentParty()`              | —                      | `Party?`             | Null if not in party                     |
| `GetMembers()`                   | —                      | `List<PartyMember>`  |                                          |
| `GetMatchmakingTicket()`         | —                      | `MatchmakingTicket?` | Null if not matchmaking                  |
| `GetState()`                     | —                      | `PartyState`         |                                          |
| `Refresh()`                      | —                      | `void`               |                                          |
| `AddListener(listener)`          | `Action`               | `void`               |                                          |
| `RemoveListener(listener)`       | `Action`               | `void`               |                                          |

### Party

| Field       | Type      | Notes                 |
| ----------- | --------- | --------------------- |
| `Id`        | `string`  |                       |
| `LeaderId`  | `string`  |                       |
| `MaxSize`   | `int`     |                       |
| `JoinCode`  | `string?` | Null if not generated |
| `CreatedAt` | `string`  |                       |

### PartyMember

| Field        | Type                         | Notes                    |
| ------------ | ---------------------------- | ------------------------ |
| `PlayerId`   | `string`                     |                          |
| `Role`       | `string`                     | `"leader"` or `"member"` |
| `Ready`      | `bool`                       |                          |
| `JoinedAt`   | `string`                     |                          |
| `Attributes` | `Dictionary<string, string>` | Custom per-member data   |

### MatchmakingTicket

| Field        | Type     | Notes |
| ------------ | -------- | ----- |
| `TicketID`   | `string` |       |
| `QueueName`  | `string` |       |
| `EnqueuedAt` | `string` |       |
