pocketmine\entity\Attribute::setMaxValue PHP Method

setMaxValue() public method

public setMaxValue ( $maxValue )
    public function setMaxValue($maxValue)
    {
        if ($maxValue < $this->getMinValue()) {
            throw new \InvalidArgumentException("Value {$maxValue} is bigger than the minValue!");
        }
        if ($this->maxValue != $maxValue) {
            $this->desynchronized = true;
            $this->maxValue = $maxValue;
        }
        return $this;
    }