C# Class fCraft.Color

Static class with definitions of Minecraft color codes, parsers/converters, and utilities.
Afficher le fichier Open project: GlennMR/800craft

Méthodes publiques

Свойство Type Description
ColorNames string>.SortedList
Sys string

Méthodes publiques

Méthode Description
EscapeAmpersands ( [ input ) : string
IrcToMinecraftColors ( [ sb ) : void

Replaces IRC color codes with equivalent Minecraft color codes, in the given StringBuilder. Opposite of MinecraftToIrcColors method.

IsValidColorCode ( char code ) : bool

Checks whether a color code is valid (checks if it's hexadecimal char).

MinecraftToIrcColors ( [ sb ) : void

Replaces Minecraft color codes with equivalent IRC color codes, in the given StringBuilder. Opposite of IrcToMinecraftColors method.

ParseToIndex ( [ color ) : int
ReplacePercentCodes ( [ message ) : string
ReplacePercentCodes ( [ sb ) : void
StripColors ( [ input ) : string

Strips all ampersand color codes, and unescapes doubled-up ampersands.

SubstituteSpecialColors ( [ input ) : string
SubstituteSpecialColors ( [ sb ) : void

Substitutes all fCraft-specific ampersand color codes (like &S/Color.Sys) with the assigned Minecraft colors (like &E/Color.Yellow). Strips any unrecognized sequences. Does not replace percent-codes. Note that LineWrapper itself does this substitution internally.

Private Methods

Méthode Description
GetName ( char code ) : string
GetName ( int index ) : string
GetName ( string color ) : string
IrcToMinecraftColors ( [ input ) : string
MinecraftToIrcColors ( [ input ) : string
Parse ( char code ) : string
Parse ( int index ) : string
Parse ( string color ) : string

Method Details

EscapeAmpersands() public static méthode

public static EscapeAmpersands ( [ input ) : string
input [
Résultat string

IrcToMinecraftColors() public static méthode

Replaces IRC color codes with equivalent Minecraft color codes, in the given StringBuilder. Opposite of MinecraftToIrcColors method.
sb is null.
public static IrcToMinecraftColors ( [ sb ) : void
sb [ StringBuilder objects, the contents of which will be processed.
Résultat void

IsValidColorCode() public static méthode

Checks whether a color code is valid (checks if it's hexadecimal char).
public static IsValidColorCode ( char code ) : bool
code char
Résultat bool

MinecraftToIrcColors() public static méthode

Replaces Minecraft color codes with equivalent IRC color codes, in the given StringBuilder. Opposite of IrcToMinecraftColors method.
sb is null.
public static MinecraftToIrcColors ( [ sb ) : void
sb [ StringBuilder objects, the contents of which will be processed.
Résultat void

ParseToIndex() public static méthode

public static ParseToIndex ( [ color ) : int
color [
Résultat int

ReplacePercentCodes() public static méthode

public static ReplacePercentCodes ( [ message ) : string
message [
Résultat string

ReplacePercentCodes() public static méthode

public static ReplacePercentCodes ( [ sb ) : void
sb [
Résultat void

StripColors() public static méthode

Strips all ampersand color codes, and unescapes doubled-up ampersands.
public static StripColors ( [ input ) : string
input [
Résultat string

SubstituteSpecialColors() public static méthode

public static SubstituteSpecialColors ( [ input ) : string
input [
Résultat string

SubstituteSpecialColors() public static méthode

Substitutes all fCraft-specific ampersand color codes (like &S/Color.Sys) with the assigned Minecraft colors (like &E/Color.Yellow). Strips any unrecognized sequences. Does not replace percent-codes. Note that LineWrapper itself does this substitution internally.
sb is null.
public static SubstituteSpecialColors ( [ sb ) : void
sb [ StringBuilder, contents of which will be processed.
Résultat void

Property Details

ColorNames public_oe static_oe property

public static SortedList ColorNames
Résultat string>.SortedList

Sys public_oe static_oe property

public static string Sys
Résultat string