createParty method

Future<Party> createParty({
  1. int? maxSize,
  2. bool? open,
})

Creating parties

The player who creates the party is the party’s leader. Parties have maximum number of players and can be open to automatically accept players or closed so that the party leader can accept incoming join requests.

Implementation

Future<Party> createParty({int? maxSize, bool? open}) async {
  final res = await _send<rtpb.Party>(rtpb.Envelope(
      partyCreate: rtpb.PartyCreate(
    maxSize: maxSize,
    open: open,
  )));

  return Party.fromDto(res);
}