Allow clients to download maps from the server.
Only available to Admin.
@param bool $allow
@param bool $multicall
@return bool
@throws InvalidArgumentException
499791
function allowMapDownload($allow = true, $multicall = false)
    {
        if (!is_bool($allow)) {
            throw new InvalidArgumentException('allow = ' . print_r($allow, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($allow), $multicall);
    }
1099482
function unsetServerTag($key, $multicall = false)
    {
        if (!is_string($key)) {
            throw new InvalidArgumentException('key = ' . print_r($key, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($key), $multicall);
    }
676048
protected static function share($callable)
    {
        if (!is_object($callable) || !method_exists($callable, '__invoke')) {
            throw new InvalidArgumentException('Service definition is not a Closure or invokable object.');
        }

        return function ($container) use ($callable) {
            static $object;

            if (null === $object) {
                $object = $callable($container);
            }

            return $object;
        };
    }
1224295
public function enable($enable = true)
    {
        if (! is_bool($enable)) {
            throw new InvalidArgumentException("enable must be a boolean. [$enable] given.");
        }

        $this->enabled = $enable;

        return $this;
    }
936005
function setCupNbWinners($winners, $multicall = false)
    {
        if (!is_int($winners)) {
            throw new InvalidArgumentException('winners = ' . print_r($winners, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($winners), $multicall);
    }
1219251
public function map($callback)
    {
        if (!is_callable($callback)) {
            throw new InvalidArgumentException('Callback has to be a valid callable, '.gettype($callback).' given.');
        }

        for ($i = 0; $this->checkIfLineNumberIsValid($i, false); $i++) {
            $this->setCurrentLineNumber($i);
            call_user_func($callback, $this->getLine($i), $i, $this);
        }
    }
1202625
function disconnectFakePlayer($login, $multicall = false)
    {
        if (!is_string($login)) {
            throw new InvalidArgumentException('login = ' . print_r($login, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($login), $multicall);
    }
1190810
function getForcedMusic($multicall = false)
    {
        if ($multicall) {
            return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Music'));
        }
        return Structures\Music::fromArray($this->execute(ucfirst(__FUNCTION__)));
    }
212766
function changeAuthPassword($user, $password, $multicall = false)
    {
        if (!is_string($user) || !isset(self::$levels[$user])) {
            throw new InvalidArgumentException('user = ' . print_r($user, true));
        }
        if (!is_string($password)) {
            throw new InvalidArgumentException('password = ' . print_r($password, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($user, $password), $multicall);
    }
543973
function getVersion($multicall = false)
    {
        if ($multicall) {
            return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('Version'));
        }
        return Structures\Version::fromArray($this->execute(ucfirst(__FUNCTION__)));
    }
491139
function getBanList($length = -1, $offset = 0, $multicall = false)
    {
        if (!is_int($length)) {
            throw new InvalidArgumentException('length = ' . print_r($length, true));
        }
        if (!is_int($offset)) {
            throw new InvalidArgumentException('offset = ' . print_r($offset, true));
        }

        if ($multicall) {
            return $this->execute(ucfirst(__FUNCTION__), array($length, $offset), $this->structHandler('PlayerBan', true));
        }
        return Structures\PlayerBan::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset)));
    }
123932
public function allowCrossDomain($allow = true, $header = [])
    {
        if (!empty($header)) {
            $this->header($header);
        }

        if ($allow && $this->parent) {
            $this->parent->addRuleItem($this, 'options');
        }

        return $this->option('cross_domain', $allow);
    }
638150
function setNextMapIdent($ident, $multicall = false)
    {
        if (!is_string($ident)) {
            throw new InvalidArgumentException('ident = ' . print_r($ident, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($ident), $multicall);
    }
1367105
function setServerPassword($password, $multicall = false)
    {
        if (!is_string($password)) {
            throw new InvalidArgumentException('password = ' . print_r($password, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($password), $multicall);
    }
255057
function sendModeScriptCommands($commands, $multicall = false)
    {
        if (!is_array($commands) || !$commands) {
            throw new InvalidArgumentException('commands = ' . print_r($commands, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($commands), $multicall);
    }
702790
function getForcedMods($multicall = false)
    {
        if ($multicall) {
            return $this->execute(ucfirst(__FUNCTION__), array(), function ($v) {
                $v['Mods'] = Structures\Mod::fromArrayOfArray($v['Mods']);
                return $v;
            });
        }
        $result = $this->execute(ucfirst(__FUNCTION__));
        $result['Mods'] = Structures\Mod::fromArrayOfArray($result['Mods']);
        return $result;
    }
821997
function setNextMapIndex($index, $multicall = false)
    {
        if (!is_int($index)) {
            throw new InvalidArgumentException('index = ' . print_r($index, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($index), $multicall);
    }