public class PacketPlayInPlayerAbilities extends InPacket
Modifier and Type | Field and Description |
---|---|
protected byte |
flags
The flags are whether damage is disabled (god mode, 8, bit 3), whether the player can fly (4, bit 2), whether
the
player is flying (2, bit 1), and whether the player is in creative mode (1, bit 0).
|
protected float |
flyingSpeed
Previous integer value divided by 250
|
protected float |
walkingSpeed
Previous integer value divided by 250
|
Constructor and Description |
---|
PacketPlayInPlayerAbilities() |
Modifier and Type | Method and Description |
---|---|
Packet |
decode(ByteBuf buf)
Sets the fields of the packet from the data serialized into the buffer
|
byte |
flags() |
float |
flyingSpeed() |
void |
handleReceived(ClientConnection connection)
Handles the packet after receiving it from a connection, is invoked by the ClientConnection that received it
|
int |
id()
Gets the ID of this packet, according to the protocol specification
|
float |
walkingSpeed() |
protected byte flags
protected float flyingSpeed
protected float walkingSpeed
public PacketPlayInPlayerAbilities()
public int id()
Packet
public Packet decode(ByteBuf buf)
Packet
buf
- the buffer storing the serialized packet datapublic byte flags()
public float flyingSpeed()
public float walkingSpeed()
public void handleReceived(ClientConnection connection)
Packet
Used to allow the packet to notify the ClientConnection
of packets the server receives, and make changes specific to this packet
connection
- The connection that sent the packetCopyright © 2016. All rights reserved.