Lobby Member Data
Like what your seeing?
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!
Introduction
LobbyMemberData is a structure that wraps around LobbyData and UserData to simplify access to the lobby member metadata and related features for a specific user on a specific lobby. In most cases, you would be working with the LobbyMemberData of the local user and can easily create the LobbyMemberData by reading it from the related lobby.
The most common thing to do with a LobbyMemberData is to set the metadata of that member.
You can learn more about Lobby metadata and LobbyMemberData metadata by reading this article.
This struct represents a user in a given lobby.
This structure does not store any data locally, it is simply a means by which you can simplify the reading and writing of data to and from a LobbyMemberData ...
For example to read the metadata of a field on a user you typically need to know the Lobby's ID and the User's ID and then call the API such as
As you can see this is long and easily make a mistake with and so by using this tool we can simplify that as.
You can get a list of the LobbyMemberData's in a Lobby or you can create the LobbyMemberData assuming you know the Lobby ID and the User's ID i.e.
Is the exact same data as
which is the same data as
Fields and Attributes
Lobby
The ID of the lobby this member is a member of
User
The ID of the user this represents
Is Ready
A shortcut to read or write the user's lobby member metadata for the field z_heathenReady
This is the same as calling
to set a value or
The read the value as a bool
Game Version
A shortcut to read or write the user's lobby member metadata for the field z_heathenGameVersion
This is the same as calling
to set a value or
The read the value as a bool
Methods
this[string key]
Can be used to get or set metadata values on this user. Only the user its self can set metadata values.
Kick
Kick this user from this lobby using the Heathen Kick list
Get
This returns a lobby member data object for the indicated user, in the indicated lobby ... this assumes the member is in the lobby it does not test for this.
Generally your better to use
Last updated