Skip to main content

ServerPlayerConnectionHandlerOld.PlayerJoinResult

A protected struct in Root.Township, Alta.Networking.Servers. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Server: the outcome of checking whether a player may join, either their user info and role or a denial message. Made with the two static helpers.

Constructors​

2 private and internal constructors
MemberWhat it is
private PlayerJoinResult(UserInfoAndRole userInfo)Creates a ServerPlayerConnectionHandlerOld.PlayerJoinResult from error.
private PlayerJoinResult(string error)Creates a ServerPlayerConnectionHandlerOld.PlayerJoinResult from error.

Properties​

MemberWhat it is
string Error { get; private set; }Why the join was denied. Null on success.
bool IsSuccessful { get; private set; }Whether the player is allowed to join.
UserInfoAndRole UserInfo { get; set; }The joining player's user info and role. Only set on success.

Methods​

MemberWhat it is
static ServerPlayerConnectionHandlerOld.PlayerJoinResult CreateDeniedResult(string error)Makes a failed result with the given error message.
static ServerPlayerConnectionHandlerOld.PlayerJoinResult CreateSuccessResult(UserInfoAndRole userInfo)Makes a successful result holding the player's user info and role.

Used in​

Members of other types that take, return or hold a PlayerJoinResult: