pocketmine\entity\Entity::setSprinting PHP Method

setSprinting() public method

public setSprinting ( $value = true )
    public function setSprinting($value = true)
    {
        if ($value !== $this->isSprinting()) {
            $this->setDataFlag(self::DATA_FLAGS, self::DATA_FLAG_SPRINTING, (bool) $value);
            $attr = $this->attributeMap->getAttribute(Attribute::MOVEMENT_SPEED);
            $attr->setValue($value ? $attr->getValue() * 1.3 : $attr->getValue() / 1.3);
        }
    }