fCraft  0.638
Custom Minecraft Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events
fCraft.SecurityController Class Reference

Controller for setting and checking per-rank permissions and per-player exceptions. Used by World.AccessSecurity, World.BuildSecurity, and Zone. More...

+ Inheritance diagram for fCraft.SecurityController:
+ Collaboration diagram for fCraft.SecurityController:

Public Member Functions

void ResetMinRank ()
 
 SecurityController ()
 Creates a new controller with no restrictions.
 
PermissionOverride Include ([NotNull] PlayerInfo info)
 Either specially includes a player (if their state was previously neutral), or removes a specific exclusion.
 
PermissionOverride Exclude ([NotNull] PlayerInfo info)
 Either specially excludes a player (if their state was previously neutral), or removes a specific inclusion.
 
bool Check ([NotNull] PlayerInfo info)
 Checks whether a player is allowed by this controller.
 
SecurityCheckResult CheckDetailed ([NotNull] PlayerInfo info)
 Checks player's permission status with this controller, in detail.
 
string GetDescription ([NotNull] IClassy target,[NotNull] string noun,[NotNull] string verb)
 Creates a description string of the controller.
 
 SecurityController ([NotNull] XContainer el, bool parseExceptions)
 
XElement Serialize ()
 
XElement Serialize ([NotNull] string tagName)
 
void ResetIncludedList ()
 Clears the list of specifically included players.
 
void ResetExcludedList ()
 Clears the list of specifically excluded players.
 
void Reset ()
 Resets all permissions: minimum rank, excluded player list, and included player list.
 
 SecurityController ([NotNull] SecurityController other)
 Creates a copy of an existing controller.
 
object Clone ()
 Creates a copy of an existing controller.
 

Public Attributes

const string XmlRootElementName = "PermissionController"
 

Properties

PlayerExceptions ExceptionList [get, set]
 
Rank MinRank [get, set]
 Lowest allowed player rank.
 
bool HasRankRestriction [get]
 True if a rank restriction is in effect. This property is used to distinguish cases of no MinRank set vs. cases of MinRank set to LowestRank.
 
bool HasRestrictions [get]
 True if this controller has any restrictions (per-rank or per-player).
 

Events

EventHandler Changed
 
- Events inherited from fCraft.INotifiesOnChange
EventHandler Changed
 

Detailed Description

Controller for setting and checking per-rank permissions and per-player exceptions. Used by World.AccessSecurity, World.BuildSecurity, and Zone.

Constructor & Destructor Documentation

fCraft.SecurityController.SecurityController ( )

Creates a new controller with no restrictions.

fCraft.SecurityController.SecurityController ( [NotNull] XContainer  el,
bool  parseExceptions 
)
fCraft.SecurityController.SecurityController ( [NotNull] SecurityController  other)

Creates a copy of an existing controller.

Member Function Documentation

bool fCraft.SecurityController.Check ( [NotNull] PlayerInfo  info)

Checks whether a player is allowed by this controller.

Parameters
infoPlayer to check.
Returns
True if player is allowed.
SecurityCheckResult fCraft.SecurityController.CheckDetailed ( [NotNull] PlayerInfo  info)

Checks player's permission status with this controller, in detail.

Parameters
infoPlayer to check.
Returns
Security check result.
object fCraft.SecurityController.Clone ( )

Creates a copy of an existing controller.

PermissionOverride fCraft.SecurityController.Exclude ( [NotNull] PlayerInfo  info)

Either specially excludes a player (if their state was previously neutral), or removes a specific inclusion.

Parameters
infoPlayer's info.
Returns
Previous exception state of the player.
string fCraft.SecurityController.GetDescription ( [NotNull] IClassy  target,
[NotNull] string  noun,
[NotNull] string  verb 
)

Creates a description string of the controller.

Parameters
targetName of the object that owns this controller.
nounThe type of target (e.g. "world" or "zone").
verbThe action, in past tense, that this controller manages (e.g. "accessed" or "modified").
PermissionOverride fCraft.SecurityController.Include ( [NotNull] PlayerInfo  info)

Either specially includes a player (if their state was previously neutral), or removes a specific exclusion.

Parameters
infoPlayer's info.
Returns
Previous exception state of the player.
void fCraft.SecurityController.Reset ( )

Resets all permissions: minimum rank, excluded player list, and included player list.

void fCraft.SecurityController.ResetExcludedList ( )

Clears the list of specifically excluded players.

void fCraft.SecurityController.ResetIncludedList ( )

Clears the list of specifically included players.

void fCraft.SecurityController.ResetMinRank ( )
XElement fCraft.SecurityController.Serialize ( )
XElement fCraft.SecurityController.Serialize ( [NotNull] string  tagName)

Member Data Documentation

const string fCraft.SecurityController.XmlRootElementName = "PermissionController"

Property Documentation

PlayerExceptions fCraft.SecurityController.ExceptionList
getset
bool fCraft.SecurityController.HasRankRestriction
get

True if a rank restriction is in effect. This property is used to distinguish cases of no MinRank set vs. cases of MinRank set to LowestRank.

bool fCraft.SecurityController.HasRestrictions
get

True if this controller has any restrictions (per-rank or per-player).

Rank fCraft.SecurityController.MinRank
getset

Lowest allowed player rank.

Event Documentation

EventHandler fCraft.SecurityController.Changed

The documentation for this class was generated from the following file: