Manages all the ranks on a server. Controlls what ranks are avaliable and in what order they exist in.
More...
|
| static void | AddRank ([NotNull] Rank rank) |
| | Adds a new rank to the list. Checks for duplicates.
|
| |
| static Rank | FindRank (string name) |
| | Parses rank name (without the ID) using autocompletion.
|
| |
| static Rank | FindRank (int index) |
| | Finds rank by index. Rank at index 0 is the highest.
|
| |
| static int | GetIndex (Rank rank) |
| |
| static bool | DeleteRank ([NotNull] Rank deletedRank,[NotNull] Rank replacementRank) |
| | Removes the specified rank from the list of available ranks
|
| |
| static bool | CanRenameRank ([NotNull] Rank rank,[NotNull] string newName) |
| |
| static void | RenameRank ([NotNull] Rank rank,[NotNull] string newName) |
| |
| static bool | RaiseRank ([NotNull] Rank rank) |
| | Raises the index value of the specified Rank, and then lowers the rank that was previously in that position.
|
| |
| static bool | LowerRank ([NotNull] Rank rank) |
| | Lowers the index value of the specified Rank, and then raises the rank that was previously in that position.
|
| |
| static string | GenerateID () |
| | Creates a 16 character unique rank ID, via Server.GetRandomString().
|
| |
| static Rank | GetMinRankWithAllPermissions ([NotNull] params Permission[] permissions) |
| | Finds the lowest rank that has all the required permissions.
|
| |
| static Rank | GetMinRankWithAnyPermission ([NotNull] params Permission[] permissions) |
| | Finds the lowest rank that has all the required permissions.
|
| |
|
| static Dictionary< string, Rank > | RanksByName [get, set] |
| | List of Ranks, indexed by their name.
|
| |
| static Dictionary< string, Rank > | RanksByFullName [get, set] |
| | List of Ranks, indexed by their fully qualified name.
|
| |
| static Dictionary< string, Rank > | RanksByID [get, set] |
| | List of Ranks, indexed by their ID.
|
| |
| static List< Rank > | Ranks [get, set] |
| | List of all Ranks, in no particular order.
|
| |
| static Rank | DefaultRank [get, set] |
| | Default Rank of a new user.
|
| |
| static Rank | LowestRank [get, set] |
| | Lowest Rank available in the server.
|
| |
| static Rank | HighestRank [get, set] |
| | Highest Rank available in the server.
|
| |
| static Rank | PatrolledRank [get, set] |
| | Highest Rank that Patrol will consider when selecting canditates.
|
| |
| static Rank | DefaultBuildRank [get, set] |
| | The default minimum Rank required to build in newly created worlds.
|
| |
| static Rank | BlockDBAutoEnableRank [get, set] |
| | Rank used by BlockDB to determine whether it should be auto-enabled on a world or not. Worlds where BuildSecurity.MinRank is equal or lower than this rank WILL have BlockDB auto-enabled.
|
| |
Manages all the ranks on a server. Controlls what ranks are avaliable and in what order they exist in.
| static void fCraft.RankManager.AddRank |
( |
[NotNull] Rank |
rank | ) |
|
|
static |
Adds a new rank to the list. Checks for duplicates.
| static bool fCraft.RankManager.CanRenameRank |
( |
[NotNull] Rank |
rank, |
|
|
[NotNull] string |
newName |
|
) |
| |
|
static |
| static bool fCraft.RankManager.DeleteRank |
( |
[NotNull] Rank |
deletedRank, |
|
|
[NotNull] Rank |
replacementRank |
|
) |
| |
|
static |
Removes the specified rank from the list of available ranks
- Parameters
-
| deletedRank | Rank to be deleted. |
| replacementRank | Rank that will replace the deleted rank. |
- Returns
- Whether or not the rank was succesfully deleted/replaced.
- Exceptions
-
| ArgumentNullException | deletedRank or replacementRank is null. |
| InvalidOperationException | PlayerDB is already loaded. |
| static Rank fCraft.RankManager.FindRank |
( |
string |
name | ) |
|
|
static |
Parses rank name (without the ID) using autocompletion.
- Parameters
-
| name | Full or partial rank name. May be null. |
- Returns
- If name could be parsed, returns the corresponding Rank object. Otherwise returns null. If null was given instead of rank name, returns null.
| static Rank fCraft.RankManager.FindRank |
( |
int |
index | ) |
|
|
static |
Finds rank by index. Rank at index 0 is the highest.
- Returns
- If name could be parsed, returns the corresponding Rank object. Otherwise returns null.
| static string fCraft.RankManager.GenerateID |
( |
| ) |
|
|
static |
| static int fCraft.RankManager.GetIndex |
( |
Rank |
rank | ) |
|
|
static |
| static Rank fCraft.RankManager.GetMinRankWithAllPermissions |
( |
[NotNull] params Permission[] |
permissions | ) |
|
|
static |
Finds the lowest rank that has all the required permissions.
- Parameters
-
| permissions | One or more permissions to check for. |
- Returns
- A relevant Rank object, or null of none were found.
| static Rank fCraft.RankManager.GetMinRankWithAnyPermission |
( |
[NotNull] params Permission[] |
permissions | ) |
|
|
static |
Finds the lowest rank that has all the required permissions.
- Parameters
-
| permissions | One or more permissions to check for. |
- Returns
- A relevant Rank object, or null of none were found.
| static bool fCraft.RankManager.LowerRank |
( |
[NotNull] Rank |
rank | ) |
|
|
static |
Lowers the index value of the specified Rank, and then raises the rank that was previously in that position.
- Parameters
-
- Returns
- True if the Rank index was lowered; false if it is already the lowest rank.
- Exceptions
-
| ArgumentNullException | rank is null. |
| InvalidOperationException | PlayerDB is already loaded. |
| static bool fCraft.RankManager.RaiseRank |
( |
[NotNull] Rank |
rank | ) |
|
|
static |
Raises the index value of the specified Rank, and then lowers the rank that was previously in that position.
- Parameters
-
- Returns
- True if the Rank index was raised; false if it is already the highest rank.
- Exceptions
-
| ArgumentNullException | rank is null. |
| InvalidOperationException | PlayerDB is already loaded. |
| static void fCraft.RankManager.RenameRank |
( |
[NotNull] Rank |
rank, |
|
|
[NotNull] string |
newName |
|
) |
| |
|
static |
| Rank fCraft.RankManager.BlockDBAutoEnableRank |
|
staticgetset |
Rank used by BlockDB to determine whether it should be auto-enabled on a world or not. Worlds where BuildSecurity.MinRank is equal or lower than this rank WILL have BlockDB auto-enabled.
| Rank fCraft.RankManager.DefaultBuildRank |
|
staticgetset |
The default minimum Rank required to build in newly created worlds.
| Rank fCraft.RankManager.DefaultRank |
|
staticgetset |
Default Rank of a new user.
| Rank fCraft.RankManager.HighestRank |
|
staticgetset |
Highest Rank available in the server.
| Rank fCraft.RankManager.LowestRank |
|
staticgetset |
Lowest Rank available in the server.
| Rank fCraft.RankManager.PatrolledRank |
|
staticgetset |
Highest Rank that Patrol will consider when selecting canditates.
| List<Rank> fCraft.RankManager.Ranks |
|
staticgetset |
List of all Ranks, in no particular order.
| Dictionary<string, Rank> fCraft.RankManager.RanksByFullName |
|
staticgetset |
List of Ranks, indexed by their fully qualified name.
| Dictionary<string, Rank> fCraft.RankManager.RanksByID |
|
staticgetset |
List of Ranks, indexed by their ID.
| Dictionary<string, Rank> fCraft.RankManager.RanksByName |
|
staticgetset |
List of Ranks, indexed by their name.
The documentation for this class was generated from the following file: