- Preparing search index...
- The search index is not available
node-hill-s
Constructors
constructor
- new PacketBuilder(packetType: PacketEnums | "Authentication" | "SendBrick" | "SendPlayers" | "Figure" | "RemovePlayer" | "Chat" | "PlayerModification" | "Kill" | "Brick" | "Team" | "Tool" | "Bot" | "ClearMap" | "DestroyBot" | "DeleteBrick" | "AddKeypress" | "SoundEmitter" | "SendSoundEmitters", options?: PacketBuilderOptions): PacketBuilder
-
Parameters
-
packetType: PacketEnums | "Authentication" | "SendBrick" | "SendPlayers" | "Figure" | "RemovePlayer" | "Chat" | "PlayerModification" | "Kill" | "Brick" | "Team" | "Tool" | "Bot" | "ClearMap" | "DestroyBot" | "DeleteBrick" | "AddKeypress" | "SoundEmitter" | "SendSoundEmitters"
-
Properties
buffer
buffer: SmartBuffer
compression
compression: boolean
idString
idString: string
packetId
packetId: number
Methods
broadcast
- broadcast(): Promise<boolean>
-
Returns Promise<boolean>
broadcastExcept
- broadcastExcept(players: Player[]): Promise<boolean>
-
Returns Promise<boolean>
send
- send(socket: ClientSocket): Promise<boolean>
-
Returns Promise<boolean>
Private
transformPacket
- transformPacket(): Buffer
-
Returns Buffer
write
- write(type: "string", data: string): PacketBuilder
-
Parameters
-
type: "string"
-
data: string
- write(type: "bool", data: boolean): PacketBuilder
-
Parameters
-
type: "bool"
-
data: boolean
- write(type: "float" | "uint8" | "int32" | "uint32", data: number): PacketBuilder
-
Parameters
-
type: "float" | "uint8" | "int32" | "uint32"
-
data: number
- write(type: "vector3", data: Vector3): PacketBuilder
-
Send a packet to every connected client.