Phpcraft
|
Public Member Functions | |
send (Connection $con) | |
__toString () | |
Static Public Member Functions | |
static | read (Connection $con) |
The base class for packets.
|
abstract |
Reimplemented in Phpcraft\Packet\MapData\MapDataPacket, Phpcraft\Packet\JoinGamePacket, Phpcraft\Packet\SpawnMobPacket, Phpcraft\Packet\DeclareCommands\DeclareCommandsPacket, Phpcraft\Packet\ClientSettingsPacket, Phpcraft\Packet\BossBar\AddBossBarPacket, Phpcraft\Packet\PluginMessage\PluginMessagePacket, Phpcraft\Packet\ChunkDataPacket, Phpcraft\Packet\EntityEffectPacket, Phpcraft\Packet\ClientboundAbilitiesPacket, Phpcraft\Packet\RespawnPacket, Phpcraft\Packet\KeepAliveRequestPacket, Phpcraft\Packet\SetExperiencePacket, Phpcraft\Packet\EntityVelocityPacket, Phpcraft\Packet\SetSlotPacket, Phpcraft\Packet\UnloadChunkPacket, Phpcraft\Packet\EntityAnimationPacket, Phpcraft\Packet\KeepAliveResponsePacket, Phpcraft\Packet\BossBar\UpdateBossBarHealthPacket, Phpcraft\Packet\DifficultyPacket, Phpcraft\Packet\EntityMetadataPacket, Phpcraft\Packet\SwingArmPacket, Phpcraft\Packet\RemoveEntityEffectPacket, Phpcraft\Packet\BossBar\UpdateBossBarTitlePacket, Phpcraft\Packet\ClientboundChatMessagePacket, Phpcraft\Packet\DestroyEntityPacket, Phpcraft\Packet\BossBar\RemoveBossBarPacket, Phpcraft\Packet\PluginMessage\ClientboundStringPluginMessagePacket, and Phpcraft\Packet\PluginMessage\ServerboundStringPluginMessagePacket.
|
staticabstract |
Initialises the packet class by reading its payload from the given Connection.
Connection | $con |
IOException |
Reimplemented in Phpcraft\Packet\MapData\MapDataPacket, Phpcraft\Packet\SpawnMobPacket, Phpcraft\Packet\ClientSettingsPacket, Phpcraft\Packet\JoinGamePacket, Phpcraft\Packet\EntityEffectPacket, Phpcraft\Packet\ChunkDataPacket, Phpcraft\Packet\SetSlotPacket, Phpcraft\Packet\EntityVelocityPacket, Phpcraft\Packet\BossBar\BossBarPacket, Phpcraft\Packet\ClientboundAbilitiesPacket, Phpcraft\Packet\KeepAliveRequestPacket, Phpcraft\Packet\EntityAnimationPacket, Phpcraft\Packet\KeepAliveResponsePacket, Phpcraft\Packet\SetExperiencePacket, Phpcraft\Packet\UnloadChunkPacket, Phpcraft\Packet\EntityMetadataPacket, Phpcraft\Packet\RemoveEntityEffectPacket, Phpcraft\Packet\SwingArmPacket, Phpcraft\Packet\DifficultyPacket, Phpcraft\Packet\RespawnPacket, Phpcraft\Packet\ClientboundChatMessagePacket, Phpcraft\Packet\DeclareCommands\DeclareCommandsPacket, Phpcraft\Packet\PluginMessage\ClientboundPluginMessagePacket, Phpcraft\Packet\PluginMessage\ServerboundPluginMessagePacket, and Phpcraft\Packet\DestroyEntityPacket.
|
abstract |
Adds the packet's ID and payload to the Connection's write buffer and sends it over the wire if the connection has a stream. Note that in some cases this will produce multiple Minecraft packets, therefore you should only use this on connections without a stream if you know what you're doing.
Connection | $con |
IOException |
Reimplemented in Phpcraft\Packet\MapData\MapDataPacket, Phpcraft\Packet\JoinGamePacket, Phpcraft\Packet\DeclareCommands\DeclareCommandsPacket, Phpcraft\Packet\SpawnMobPacket, Phpcraft\Packet\ClientSettingsPacket, Phpcraft\Packet\EntityEffectPacket, Phpcraft\Packet\PluginMessage\PluginMessagePacket, Phpcraft\Packet\ChunkDataPacket, Phpcraft\Packet\BossBar\AddBossBarPacket, Phpcraft\Packet\SetSlotPacket, Phpcraft\Packet\ClientboundAbilitiesPacket, Phpcraft\Packet\EntityVelocityPacket, Phpcraft\Packet\EntityAnimationPacket, Phpcraft\Packet\RespawnPacket, Phpcraft\Packet\KeepAliveRequestPacket, Phpcraft\Packet\SetExperiencePacket, Phpcraft\Packet\KeepAliveResponsePacket, Phpcraft\Packet\SwingArmPacket, Phpcraft\Packet\UnloadChunkPacket, Phpcraft\Packet\DifficultyPacket, Phpcraft\Packet\EntityMetadataPacket, Phpcraft\Packet\RemoveEntityEffectPacket, Phpcraft\Packet\ClientboundChatMessagePacket, Phpcraft\Packet\BossBar\UpdateBossBarHealthPacket, Phpcraft\Packet\BossBar\UpdateBossBarTitlePacket, Phpcraft\Packet\DestroyEntityPacket, and Phpcraft\Packet\BossBar\RemoveBossBarPacket.