ServerPacket class Null safety

The basis of each and every packet for post 1.6 servers.

Constructors

ServerPacket()

Properties

getID int
The ID of this packet
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

clone() ServerPacket
Clone this packet and create a new instance of it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
read(PacketReader reader) → void
Read a single packet from given reader's byte data.
toString() String
A string representation of this object. [...]
inherited
writePacket(PacketWriter writer) → void
Write a single packet into given writer's byte data.

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

readPacket(int id, PacketReader reader) ServerPacket?
Read a single packet by ID.
registerClientboundPacket(ServerPacket packet) → void
Register a new clientbound packet. If a clientbound packet with given ID is already registered, packet will be ignored.