boolean isFlying = LogicUtil.getBit(flag, 0x2);
boolean canFly = LogicUtil.getBit(flag, 0x4);
boolean creativeMode = LogicUtil.getBit(flag, 0x8);
float flyingSpeed = buffer.readFloat();
float walkingSpeed = buffer.readFloat();
return new PlayerAbilityMessage(godMode, isFlying, canFly, creativeMode, flyingSpeed, walkingSpeed);
}