C# Class fCraft.Player

Afficher le fichier Open project: GlennMR/800craft Class Usage Examples

Méthodes publiques

Свойство Type Description
FullPositionUpdateInterval int

Private Properties

Свойство Type Description
AddEntity void
ClearLowPriotityOutputQueue void
ClearPriorityOutputQueue void
DenyMovement void
DetectMovementPacketSpam bool
Disconnect void
GentlyKickBetaClients void
HideEntity void
IoLoop void
JoinWorldNow bool
KickNow void
LoginSequence bool
MeasureBandwidthUseRates void
MoveEntity void
NegotiateProtocolExtension bool
Player System
Player System
ProcessMessagePacket bool
ProcessMovementPacket void
ProcessOutgoingSetBlock void
ProcessSetBlockPacket void
ReAddEntity void
ReadString string
RemoveEntity void
ResetVisibleEntities void
ServeCfg void
ShowEntity void
UpdateVisibleEntities void

Méthodes publiques

Méthode Description
JoinWorld ( [ newWorld, WorldChangeReason reason ) : void
JoinWorld ( [ newWorld, WorldChangeReason reason, Position position ) : void
Kick ( [ message, LeaveReason leaveReason ) : void

Kick (asynchronous). Immediately blocks all client input, but waits until client thread has sent the kick packet.

Send ( Packet packet ) : void

Send packet (thread-safe, async, priority queue). This is used for most packets (movement, chat, etc).

SendBlockPermissions ( ) : void
SendLowPriority ( Packet packet ) : void

Send packet (thread-safe, asynchronous, delayed queue). This is currently only used for block updates.

SendNow ( Packet packet ) : void

Send packet to player (not thread safe, sync, immediate). Should NEVER be used from any thread other than this session's ioThread. Not thread-safe (for performance reason).

StartSession ( [ tcpClient ) : void
WaitForDisconnect ( ) : void

Blocks the calling thread until this session disconnects.

Private Methods

Méthode Description
AddEntity ( [ player, Position newPos ) : void
ClearLowPriotityOutputQueue ( ) : void

Clears the low priority player queue.

ClearPriorityOutputQueue ( ) : void

Clears the priority player queue.

DenyMovement ( ) : void
DetectMovementPacketSpam ( ) : bool
Disconnect ( ) : void
GentlyKickBetaClients ( ) : void
HideEntity ( [ entity ) : void
IoLoop ( ) : void
JoinWorldNow ( [ newWorld, bool doUseWorldSpawn, WorldChangeReason reason ) : bool
KickNow ( [ message, LeaveReason leaveReason ) : void

Kick (synchronous). Immediately sends the kick packet. Can only be used from IoThread (this is not thread-safe).

LoginSequence ( ) : bool
MeasureBandwidthUseRates ( ) : void
MoveEntity ( [ entity, Position newPos ) : void
NegotiateProtocolExtension ( ) : bool
Player ( ) : System
Player ( [ tcpClient ) : System
ProcessMessagePacket ( ) : bool
ProcessMovementPacket ( ) : void
ProcessOutgoingSetBlock ( Packet &packet ) : void
ProcessSetBlockPacket ( ) : void
ReAddEntity ( [ entity, [ player, Position newPos ) : void
ReadString ( ) : string
RemoveEntity ( [ player ) : void
ResetVisibleEntities ( ) : void
ServeCfg ( ) : void
ShowEntity ( [ entity, Position newPos ) : void
UpdateVisibleEntities ( ) : void

Method Details

JoinWorld() public méthode

public JoinWorld ( [ newWorld, WorldChangeReason reason ) : void
newWorld [
reason WorldChangeReason
Résultat void

JoinWorld() public méthode

public JoinWorld ( [ newWorld, WorldChangeReason reason, Position position ) : void
newWorld [
reason WorldChangeReason
position Position
Résultat void

Kick() public méthode

Kick (asynchronous). Immediately blocks all client input, but waits until client thread has sent the kick packet.
public Kick ( [ message, LeaveReason leaveReason ) : void
message [
leaveReason LeaveReason
Résultat void

Send() public méthode

Send packet (thread-safe, async, priority queue). This is used for most packets (movement, chat, etc).
public Send ( Packet packet ) : void
packet Packet
Résultat void

SendBlockPermissions() public méthode

public SendBlockPermissions ( ) : void
Résultat void

SendLowPriority() public méthode

Send packet (thread-safe, asynchronous, delayed queue). This is currently only used for block updates.
public SendLowPriority ( Packet packet ) : void
packet Packet
Résultat void

SendNow() public méthode

Send packet to player (not thread safe, sync, immediate). Should NEVER be used from any thread other than this session's ioThread. Not thread-safe (for performance reason).
public SendNow ( Packet packet ) : void
packet Packet
Résultat void

StartSession() public static méthode

public static StartSession ( [ tcpClient ) : void
tcpClient [
Résultat void

WaitForDisconnect() public méthode

Blocks the calling thread until this session disconnects.
public WaitForDisconnect ( ) : void
Résultat void

Property Details

FullPositionUpdateInterval public_oe static_oe property

public static int FullPositionUpdateInterval
Résultat int