C# Class fCraft.ChatColor

Static class with definitions of Minecraft color codes, parsers, converters, and utilities.
Datei anzeigen Open project: fragmer/fCraft Class Usage Examples

Public Properties

Property Type Description
ColorNames string>.SortedList

Private Properties

Property Type Description
GetName string
GetName string
IrcToMinecraftColors string
IsColorCode bool
IsStandardColorCode bool
MinecraftToIrcColors string
Parse string
Parse string
StripColors string
SubstituteSpecialColors string

Public Methods

Method Description
MinecraftToIrcColors ( [ sb ) : void

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

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

Method Description
GetName ( [ color ) : string
GetName ( char code ) : string
IrcToMinecraftColors ( [ input ) : string
IsColorCode ( char code ) : bool
IsStandardColorCode ( char code ) : bool
MinecraftToIrcColors ( [ input ) : string
Parse ( [ color ) : string
Parse ( char code ) : string
StripColors ( [ message ) : string
SubstituteSpecialColors ( [ input ) : string

Method Details

MinecraftToIrcColors() public static method

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.
return void

SubstituteSpecialColors() public static method

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.
return void

Property Details

ColorNames public_oe static_oe property

List of color names indexed by their id.
public static SortedList ColorNames
return string>.SortedList