Skip to main content

ServerConfiguration

A class in Root.Township, the global namespace.

A server's join list, saved as JSON in the server's server_config file. The old join handler checks it when a player connects.

Constructors​

MemberWhat it is
ServerConfiguration()Creates a ServerConfiguration with default values.

Fields​

2 private and internal fields
MemberWhat it is
private ServerListType listTypeBacking field for ListType.
private List<int> playersListBacking field for PlayersList.

Properties​

MemberWhat it is
ServerListType ListType { get; set; }Whether the list is unused, a block list or an allow list. Defaults to BlackList.
List<int> PlayersList { get; set; }Player user IDs on the list.

Methods​

MemberWhat it is
bool IsPlayerAllowed(int playerID)Checks a player ID against the list: everyone with None, not on it for BlackList, on it for WhiteList.
1 private and internal method
MemberWhat it is
private object System.ICloneable.Clone()Returns a copy with its own copy of the player list.

Used in​

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