Add

Adds a player to the node.

Constructors

this
this()
Undocumented in source.
this
this(uint hubId, ubyte reason, ubyte type, uint protocol, string vers, string username, string displayName, byte dimension, uint viewDistance, sul.protocol.hncom1.types.Address clientAddress, string serverAddress, ushort serverPort, UUID uuid, sul.protocol.hncom1.types.Skin skin, string language, ubyte inputMode, uint latency)
Undocumented in source.

Members

Aliases

Variants
alias Variants = TypeTuple!(Pocket, Minecraft, Console)
Undocumented in source.
_encode
alias _encode = encode
Undocumented in source.

Classes

Console
class Console
Undocumented in source.
Minecraft
class Minecraft

A Minecraft client. Currently there are no additional fields.

Pocket
class Pocket

A Minecraft: Pocket Edition client.

Functions

decode
void decode()
Undocumented in source. Be warned that the author may not have intended to support it.
encode
ubyte[] encode()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

fromBuffer
Add fromBuffer(ubyte[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

CLIENTBOUND
enum bool CLIENTBOUND;
Undocumented in source.
CONTROLLER
enum ubyte CONTROLLER;
Undocumented in source.
FIELDS
enum string[] FIELDS;
Undocumented in source.
FIRST_JOIN
enum ubyte FIRST_JOIN;
Undocumented in source.
FORCIBLY_TRANSFERRED
enum ubyte FORCIBLY_TRANSFERRED;
Undocumented in source.
ID
enum ubyte ID;
Undocumented in source.
KEYBOARD
enum ubyte KEYBOARD;
Undocumented in source.
SERVERBOUND
enum bool SERVERBOUND;
Undocumented in source.
TOUCH
enum ubyte TOUCH;
Undocumented in source.
TRANSFERRED
enum ubyte TRANSFERRED;
Undocumented in source.
clientAddress
sul.protocol.hncom1.types.Address clientAddress;

Remote address of the client.

dimension
byte dimension;

Dimension in which the player was playing before being transferred. It could diffent from client's game type and version because the dimension's ids are different in Minecraft and Minecraft: Pocket Edition. It's used to send the game's change dimension packet to despawn old entities and delete old chunks.

displayName
string displayName;

Display name of the player, which can contain formatting codes. By default it's equals to the username but it can be updated by the node using UpdateDisplayName.

hubId
uint hubId;
Undocumented in source.
inputMode
ubyte inputMode;

Client's input mode. See UpdateInputMode.inputMode for more informations.

language
string language;

Client's language, in the same format as HubInfo.language, which should be updated from the node when the client changes it. See also UpdateLanguage.language.

latency
uint latency;

Client's latency (ping time). See UpdateLatency.latency for more informations.

protocol
uint protocol;

Version of the protocol used by the client.

reason
ubyte reason;

Reason for which the player has been added to the node.

serverAddress
string serverAddress;

Ip used by the client to connect to the server. The value of this field is the address the client has saved in its servers list. For example a client that joins through localhost and a client that joins through 127.0.0.1 will connect to the same server but the field of this value will be different (localhost for the first client and 127.0.0.1 for the second).

serverPort
ushort serverPort;

Port used by the client to connect to the server.

skin
sul.protocol.hncom1.types.Skin skin;

Client's skin, given by the client or downloaded from Mojang's services in online mode.

type
ubyte type;

Game of the client, which could either be Minecraft or Minecraft: Pocket Edition.

username
string username;

Username of the player.

uuid
UUID uuid;

Client's UUID, given by Mojang's or Microsoft's services if the server is in online mode or given by the client (and not verified) if the server is in offline mode.

variantField
enum string variantField;
Undocumented in source.
vers
string vers;

Version of the game used by the client, usually in the format major.minor.patch, calculated by the server or passed by the client during the authentication process. The node should verify that the version exists and matches the protocol in the previous field.

viewDistance
uint viewDistance;

Client's view distance (or chunk radius). See UpdateViewDistance.viewDistance for more informations.

Inherited Members

From Buffer

_buffer
ubyte[] _buffer;
Undocumented in source.
_index
size_t _index;
Undocumented in source.
bufferInstance
Buffer bufferInstance [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
writeBytes
void writeBytes(ubyte[] bytes)
Undocumented in source. Be warned that the author may not have intended to support it.
writeString
void writeString(string str)
Undocumented in source. Be warned that the author may not have intended to support it.
readBytes
ubyte[] readBytes(size_t length)
Undocumented in source. Be warned that the author may not have intended to support it.
readString
string readString(size_t length)
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianBool
void writeBigEndianBool(bool a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianBool
bool readBigEndianBool()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianBool
void writeLittleEndianBool(bool a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianBool
bool readLittleEndianBool()
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianByte
void writeBigEndianByte(byte a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianByte
byte readBigEndianByte()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianByte
void writeLittleEndianByte(byte a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianByte
byte readLittleEndianByte()
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianUbyte
void writeBigEndianUbyte(ubyte a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianUbyte
ubyte readBigEndianUbyte()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianUbyte
void writeLittleEndianUbyte(ubyte a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianUbyte
ubyte readLittleEndianUbyte()
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianShort
void writeBigEndianShort(short a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianShort
short readBigEndianShort()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianShort
void writeLittleEndianShort(short a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianShort
short readLittleEndianShort()
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianUshort
void writeBigEndianUshort(ushort a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianUshort
ushort readBigEndianUshort()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianUshort
void writeLittleEndianUshort(ushort a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianUshort
ushort readLittleEndianUshort()
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianTriad
void writeBigEndianTriad(int a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianTriad
int readBigEndianTriad()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianTriad
void writeLittleEndianTriad(int a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianTriad
int readLittleEndianTriad()
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianInt
void writeBigEndianInt(int a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianInt
int readBigEndianInt()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianInt
void writeLittleEndianInt(int a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianInt
int readLittleEndianInt()
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianUint
void writeBigEndianUint(uint a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianUint
uint readBigEndianUint()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianUint
void writeLittleEndianUint(uint a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianUint
uint readLittleEndianUint()
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianLong
void writeBigEndianLong(long a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianLong
long readBigEndianLong()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianLong
void writeLittleEndianLong(long a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianLong
long readLittleEndianLong()
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianUlong
void writeBigEndianUlong(ulong a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianUlong
ulong readBigEndianUlong()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianUlong
void writeLittleEndianUlong(ulong a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianUlong
ulong readLittleEndianUlong()
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianFloat
void writeBigEndianFloat(float a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianFloat
float readBigEndianFloat()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianFloat
void writeLittleEndianFloat(float a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianFloat
float readLittleEndianFloat()
Undocumented in source. Be warned that the author may not have intended to support it.
writeBigEndianDouble
void writeBigEndianDouble(double a)
Undocumented in source. Be warned that the author may not have intended to support it.
readBigEndianDouble
double readBigEndianDouble()
Undocumented in source. Be warned that the author may not have intended to support it.
writeLittleEndianDouble
void writeLittleEndianDouble(double a)
Undocumented in source. Be warned that the author may not have intended to support it.
readLittleEndianDouble
double readLittleEndianDouble()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta