API - This plugins provides the following for other plugins to use:
(bool) IsClanMember(ulong playerId, ulong otherId) - Check if 2 players are clan mates
(bool) IsMemberOrAlly(ulong playerId, ulong otherId) - Check if 2 players are clan mates or clan allies
(bool) IsAllyPlayer(ulong playerId, ulong otherId) - Check if 2 players are in allied clans
(JObject)GetClan(string tag) - Returns a JObject representing the clan using the specified tag or null if there is no such clan.
The JObject contains the following properties:
tag:string,
description:string,
owner:ulong,
council:ulong,
moderators:JArray:ulong,
members:JArray:ulong,
allies:JArray:string
invitedallies:JArray:string
(string) GetClanOf(BasePlayer | string | ulong) - Returns the clan tag of a player's clan or null if the player is not a member of a clan
(JArray)GetAllClans() - Returns an array of all clan tags
(List<string>)GetClanMembers(ulong | string) - Returns the member-id list of a player's clan or null if the player is not a member of a clan
The plugin also calls the following simple hooks (no return behaviour) on changes:
(void)OnClanCreate(string tag) - Called when a new clan has been created
(void)OnClanUpdate(string tag) - Called when clan members or invites change
(void)OnClanDestroy(string tag) - Called when a clan is disbanded or deleted
The plugin also calls the following informational hooks (no return behaviour) on changes:
(void)OnClanMemberJoined(string userID, List<string> memberUserIDs) - Called when a player joined a clan. Provides the Id of the new member and the full list of prior members excluding that Id
(void)OnClanMemberJoined(string userID, string tag) - Called when a player joined a clan. Provides the Id of the new member and the clan tag
(void)OnClanMemberGone(string userID, List<string> memberUserIDs) - Called when a player left a clan (leave|kick). Provides the Id of the old member and the full list of remaining members excluding that Id
(void)OnClanMemberGone(string userID, string tag) - Called when a player left a clan (leave|kick). Provides the Id of the old member and the clan tag
(void)OnClanDisbanded(List<string> memberUserIDs) - Called when a clan was disbanded or deleted. Provides the full memberlist at the time of deletion.
(void)OnClanDisbanded(string tag, List<string> memberUserIDs) - Called when a clan was disbanded or deleted. Provides the full memberlist at the time of deletion.