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

Intelligent line-wrapper for Minecraft protocol. Splits long messages into 64-character chunks of ASCII. Maintains colors between lines. Wraps at word boundaries and hyphens. Removes invalid characters and color sequences. Supports optional line prefixes for second and consequent lines. This class is implemented as IEnumerable of Packets, so it's usable with foreach() and Linq. More...

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

Public Member Functions

void Reset ()
 
bool MoveNext ()
 
IEnumerator< PacketGetEnumerator ()
 

Static Public Member Functions

static LineWrapper Wrap (string message)
 Creates a new line wrapper for a given raw string.
 
static LineWrapper WrapPrefixed (string prefix, string message)
 Creates a new line wrapper for a given raw string.
 

Properties

Packet Current [get, set]
 

Detailed Description

Intelligent line-wrapper for Minecraft protocol. Splits long messages into 64-character chunks of ASCII. Maintains colors between lines. Wraps at word boundaries and hyphens. Removes invalid characters and color sequences. Supports optional line prefixes for second and consequent lines. This class is implemented as IEnumerable of Packets, so it's usable with foreach() and Linq.

Member Function Documentation

IEnumerator<Packet> fCraft.LineWrapper.GetEnumerator ( )
bool fCraft.LineWrapper.MoveNext ( )
void fCraft.LineWrapper.Reset ( )
static LineWrapper fCraft.LineWrapper.Wrap ( string  message)
static

Creates a new line wrapper for a given raw string.

Exceptions
ArgumentNullExceptionmessage is null.
static LineWrapper fCraft.LineWrapper.WrapPrefixed ( string  prefix,
string  message 
)
static

Creates a new line wrapper for a given raw string.

Exceptions
ArgumentNullExceptionprefix or message is null.
ArgumentExceptionprefix length exceeds maximum allowed value (48 characters).

Property Documentation

Packet fCraft.LineWrapper.Current
getset

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