C# 클래스 fCraft.RankManager

Manages all the ranks on a server. Controls what ranks are available and in what order they exist in.
파일 보기 프로젝트 열기: fragmer/fCraft 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DefaultRank Rank

Private Properties

프로퍼티 타입 설명
CheckIfPlayerDBLoaded void
DefineDefaultRanks XElement
FindRank Rank
FindRank Rank
FindRank Rank
GenerateId string
GetMinRankWithAllPermissions Rank
GetMinRankWithAnyPermission Rank
ParsePermissionLimits void
RankManager System
RebuildIndex void
Reset void
SortRanksByLegacyNumericRank void

공개 메소드들

메소드 설명
AddRank ( Rank rank ) : void

Adds a new rank to the list. Checks for duplicates.

AddRank ( [ rank ) : void

Adds a new rank to the list. Checks for duplicates.

AddRank ( [ newRank, int desiredIndex ) : void

Adds a new rank to the list at the desired position in the hierarchy. Checks for duplicates.

CanRenameRank ( Rank rank, string newName ) : bool
CanRenameRank ( [ rank, [ newName ) : bool
DeleteRank ( Rank deletedRank, Rank replacementRank ) : bool
DeleteRank ( [ deletedRank, [ replacementRank ) : bool
GenerateID ( ) : string
GetIndex ( Rank rank ) : int
GetMinRankWithPermission ( ) : Rank

Finds the lowest rank that has all the required permissions.

LowerRank ( Rank rank ) : bool
LowerRank ( [ rank ) : bool
ParseRank ( string name ) : Rank

Parses serialized rank. Accepts either the "name" or "name#ID" format. Uses legacy rank mapping table for unrecognized ranks. Does not autocomple.

RaiseRank ( Rank rank ) : bool
RaiseRank ( [ rank ) : bool
RenameRank ( Rank rank, string newName ) : void
RenameRank ( [ rank, [ newName ) : void
ResetToDefaults ( ) : void

Resets the list of ranks to defaults (guest/builder/op/owner). Warning: This method is not thread-safe, and should never be used on a live server.

비공개 메소드들

메소드 설명
CheckIfPlayerDBLoaded ( ) : void
DefineDefaultRanks ( ) : XElement
FindRank ( [ name ) : Rank
FindRank ( int index ) : Rank
FindRank ( string name ) : Rank
GenerateId ( ) : string
GetMinRankWithAllPermissions ( ) : Rank
GetMinRankWithAnyPermission ( ) : Rank
ParsePermissionLimits ( ) : void
RankManager ( ) : System
RebuildIndex ( ) : void
Reset ( ) : void

Clears the list of ranks.

SortRanksByLegacyNumericRank ( ) : void

메소드 상세

AddRank() 공개 정적인 메소드

Adds a new rank to the list. Checks for duplicates.
public static AddRank ( Rank rank ) : void
rank Rank
리턴 void

AddRank() 공개 정적인 메소드

Adds a new rank to the list. Checks for duplicates.
public static AddRank ( [ rank ) : void
rank [
리턴 void

AddRank() 공개 정적인 메소드

Adds a new rank to the list at the desired position in the hierarchy. Checks for duplicates.
If rank is null. If PlayerDB is already loaded. If a rank with this name or ID is already defined.
public static AddRank ( [ newRank, int desiredIndex ) : void
newRank [ Rank to add to the list.
desiredIndex int Desired rank index (zero-based).
리턴 void

CanRenameRank() 공개 정적인 메소드

public static CanRenameRank ( Rank rank, string newName ) : bool
rank Rank
newName string
리턴 bool

CanRenameRank() 공개 정적인 메소드

public static CanRenameRank ( [ rank, [ newName ) : bool
rank [
newName [
리턴 bool

DeleteRank() 공개 정적인 메소드

public static DeleteRank ( Rank deletedRank, Rank replacementRank ) : bool
deletedRank Rank
replacementRank Rank
리턴 bool

DeleteRank() 공개 정적인 메소드

public static DeleteRank ( [ deletedRank, [ replacementRank ) : bool
deletedRank [
replacementRank [
리턴 bool

GenerateID() 공개 정적인 메소드

public static GenerateID ( ) : string
리턴 string

GetIndex() 공개 정적인 메소드

public static GetIndex ( Rank rank ) : int
rank Rank
리턴 int

GetMinRankWithPermission() 공개 정적인 메소드

Finds the lowest rank that has all the required permissions.
public static GetMinRankWithPermission ( ) : Rank
리턴 Rank

LowerRank() 공개 정적인 메소드

public static LowerRank ( Rank rank ) : bool
rank Rank
리턴 bool

LowerRank() 공개 정적인 메소드

public static LowerRank ( [ rank ) : bool
rank [
리턴 bool

ParseRank() 공개 정적인 메소드

Parses serialized rank. Accepts either the "name" or "name#ID" format. Uses legacy rank mapping table for unrecognized ranks. Does not autocomple.
public static ParseRank ( string name ) : Rank
name string Full rank name
리턴 Rank

RaiseRank() 공개 정적인 메소드

public static RaiseRank ( Rank rank ) : bool
rank Rank
리턴 bool

RaiseRank() 공개 정적인 메소드

public static RaiseRank ( [ rank ) : bool
rank [
리턴 bool

RenameRank() 공개 정적인 메소드

public static RenameRank ( Rank rank, string newName ) : void
rank Rank
newName string
리턴 void

RenameRank() 공개 정적인 메소드

public static RenameRank ( [ rank, [ newName ) : void
rank [
newName [
리턴 void

ResetToDefaults() 공개 정적인 메소드

Resets the list of ranks to defaults (guest/builder/op/owner). Warning: This method is not thread-safe, and should never be used on a live server.
public static ResetToDefaults ( ) : void
리턴 void

프로퍼티 상세

DefaultRank 공개적으로 정적으로 프로퍼티

public static Rank DefaultRank
리턴 Rank