C# Класс fCraft.Player

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
FullPositionUpdateInterval int

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

JoinWorld() публичный Метод

public JoinWorld ( [ newWorld, WorldChangeReason reason ) : void
newWorld [
reason WorldChangeReason
Результат void

JoinWorld() публичный Метод

public JoinWorld ( [ newWorld, WorldChangeReason reason, Position position ) : void
newWorld [
reason WorldChangeReason
position Position
Результат void

Kick() публичный Метод

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
Результат void

Send() публичный Метод

Send packet (thread-safe, async, priority queue). This is used for most packets (movement, chat, etc).
public Send ( Packet packet ) : void
packet Packet
Результат void

SendBlockPermissions() публичный Метод

public SendBlockPermissions ( ) : void
Результат void

SendLowPriority() публичный Метод

Send packet (thread-safe, asynchronous, delayed queue). This is currently only used for block updates.
public SendLowPriority ( Packet packet ) : void
packet Packet
Результат void

SendNow() публичный Метод

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
Результат void

StartSession() публичный статический Метод

public static StartSession ( [ tcpClient ) : void
tcpClient [
Результат void

WaitForDisconnect() публичный Метод

Blocks the calling thread until this session disconnects.
public WaitForDisconnect ( ) : void
Результат void

Описание свойств

FullPositionUpdateInterval публичное статическое свойство

public static int FullPositionUpdateInterval
Результат int