\Maniaplanet\DedicatedServerConnection

Dedicated Server Connection Instance Methods returns nothing if $multicall = true

Summary

Methods
Properties
Constants
factory()
delete()
setTimeouts()
getIdleTime()
executeCallbacks()
executeMulticall()
execute()
authenticate()
changeAuthPassword()
enableCallbacks()
setApiVersion()
getVersion()
getStatus()
quitGame()
callVote()
callVoteKick()
callVoteBan()
callVoteRestartMap()
callVoteNextMap()
cancelVote()
getCurrentCallVote()
setCallVoteTimeOut()
getCallVoteTimeOut()
setCallVoteRatio()
getCallVoteRatio()
setCallVoteRatios()
setCallVoteRatiosEx()
getCallVoteRatios()
getCallVoteRatiosEx()
chatSendServerMessage()
chatSendServerMessageToLanguage()
chatSend()
chatSendToLanguage()
getChatLines()
chatEnableManualRouting()
chatForward()
chatForwardToLogin()
sendNotice()
sendDisplayManialinkPage()
sendHideManialinkPage()
getManialinkPageAnswers()
sendOpenLink()
sendToServerAfterMatchEnd()
kick()
ban()
banAndBlackList()
unBan()
cleanBanList()
getBanList()
blackList()
unBlackList()
cleanBlackList()
getBlackList()
loadBlackList()
saveBlackList()
addGuest()
removeGuest()
cleanGuestList()
getGuestList()
loadGuestList()
saveGuestList()
setBuddyNotification()
getBuddyNotification()
writeFile()
writeFileFromFile()
tunnelSendData()
tunnelSendDataFromFile()
dedicatedEcho()
ignore()
unIgnore()
cleanIgnoreList()
getIgnoreList()
pay()
sendBill()
getBillState()
getServerPlanets()
getSystemInfo()
setConnectionRates()
getServerTags()
setServerTag()
unsetServerTag()
resetServerTags()
setServerName()
getServerName()
setServerComment()
getServerComment()
setHideServer()
getHideServer()
isRelayServer()
setServerPassword()
getServerPassword()
setServerPasswordForSpectator()
getServerPasswordForSpectator()
setMaxPlayers()
getMaxPlayers()
setMaxSpectators()
getMaxSpectators()
setLobbyInfo()
getLobbyInfo()
customizeQuitDialog()
keepPlayerSlots()
isKeepingPlayerSlots()
enableP2PUpload()
isP2PUpload()
enableP2PDownload()
isP2PDownload()
allowMapDownload()
isMapDownloadAllowed()
gameDataDirectory()
getMapsDirectory()
getSkinsDirectory()
setTeamInfo()
getTeamInfo()
setForcedClubLinks()
getForcedClubLinks()
connectFakePlayer()
disconnectFakePlayer()
getDemoTokenInfosForPlayer()
disableHorns()
areHornsDisabled()
disableServiceAnnounces()
areServiceAnnouncesDisabled()
autoSaveReplays()
autoSaveValidationReplays()
isAutoSaveReplaysEnabled()
isAutoSaveValidationReplaysEnabled()
saveCurrentReplay()
saveBestGhostsReplay()
getValidationReplay()
setLadderMode()
getLadderMode()
getLadderServerLimits()
setVehicleNetQuality()
getVehicleNetQuality()
setServerOptions()
getServerOptions()
setForcedTeams()
getForcedTeams()
setServerPackMask()
getServerPackMask()
setForcedMods()
getForcedMods()
setForcedMusic()
getForcedMusic()
setForcedSkins()
getForcedSkins()
getLastConnectionErrorMessage()
setRefereePassword()
getRefereePassword()
setRefereeMode()
getRefereeMode()
setUseChangingValidationSeed()
getUseChangingValidationSeed()
setClientInputsMaxLatency()
getClientInputsMaxLatency()
setWarmUp()
getWarmUp()
getModeScriptText()
setModeScriptText()
getModeScriptInfo()
getModeScriptSettings()
setModeScriptSettings()
sendModeScriptCommands()
setModeScriptSettingsAndCommands()
getModeScriptVariables()
setModeScriptVariables()
triggerModeScriptEvent()
triggerModeScriptEventArray()
getScriptCloudVariables()
setScriptCloudVariables()
restartMap()
nextMap()
autoTeamBalance()
stopServer()
forceEndRound()
setGameInfos()
getCurrentGameInfo()
getNextGameInfo()
getGameInfos()
setGameMode()
getGameMode()
setChatTime()
getChatTime()
setFinishTimeout()
getFinishTimeout()
setAllWarmUpDuration()
getAllWarmUpDuration()
setDisableRespawn()
getDisableRespawn()
setForceShowAllOpponents()
getForceShowAllOpponents()
setScriptName()
getScriptName()
setTimeAttackLimit()
getTimeAttackLimit()
setTimeAttackSynchStartPeriod()
getTimeAttackSynchStartPeriod()
setLapsTimeLimit()
getLapsTimeLimit()
setNbLaps()
getNbLaps()
setRoundForcedLaps()
getRoundForcedLaps()
setRoundPointsLimit()
getRoundPointsLimit()
setRoundCustomPoints()
getRoundCustomPoints()
setUseNewRulesRound()
getUseNewRulesRound()
setTeamPointsLimit()
getTeamPointsLimit()
setMaxPointsTeam()
getMaxPointsTeam()
setUseNewRulesTeam()
getUseNewRulesTeam()
setCupPointsLimit()
getCupPointsLimit()
setCupRoundsPerMap()
getCupRoundsPerMap()
setCupWarmUpDuration()
getCupWarmUpDuration()
setCupNbWinners()
getCupNbWinners()
getCurrentMapIndex()
getNextMapIndex()
setNextMapIndex()
setNextMapIdent()
jumpToMapIndex()
jumpToMapIdent()
getCurrentMapInfo()
getNextMapInfo()
getMapInfo()
checkMapForCurrentServerParams()
getMapList()
addMap()
addMapList()
removeMap()
removeMapList()
insertMap()
insertMapList()
chooseNextMap()
chooseNextMapList()
loadMatchSettings()
appendPlaylistFromMatchSettings()
saveMatchSettings()
insertPlaylistFromMatchSettings()
getPlayerList()
getPlayerInfo()
getDetailedPlayerInfo()
getMainServerPlayerInfo()
getCurrentRanking()
getCurrentRankingForLogin()
getCurrentWinnerTeam()
forceScores()
forcePlayerTeam()
forceSpectator()
forceSpectatorTarget()
spectatorReleasePlayerSlot()
manualFlowControlEnable()
manualFlowControlProceed()
manualFlowControlIsEnabled()
manualFlowControlGetCurTransition()
checkEndMatchCondition()
getNetworkStats()
startServerLan()
startServerInternet()
joinServerLan()
joinServerInternet()
No public properties found
API_2011_08_01
API_2011_10_06
API_2012_06_19
API_2013_04_16
__construct()
terminate()
$instances
$xmlrpcClient
$user
N/A
getLogin()
getLogins()
stripBom()
secureUtf8()
structHandler()
$levels
$multicallHandlers
N/A

Constants

API_2011_08_01

API_2011_08_01

API_2011_10_06

API_2011_10_06

API_2012_06_19

API_2012_06_19

API_2013_04_16

API_2013_04_16

Properties

$user

$user : string

Type

string

$levels

$levels : array<mixed,integer>

Type

array<mixed,integer>

$multicallHandlers

$multicallHandlers : array<mixed,callable>

Type

array<mixed,callable>

Methods

factory()

factory(string  $host = '127.0.0.1', integer  $port = 5000, integer  $timeout = 5, string  $user = 'SuperAdmin', string  $password = 'SuperAdmin', string  $apiVersion = self::API_2013_04_16) : \Maniaplanet\DedicatedServer\Connection

Parameters

string $host
integer $port
integer $timeout

(in s)

string $user
string $password
string $apiVersion

Returns

\Maniaplanet\DedicatedServer\Connection

delete()

delete(\Maniaplanet\DedicatedServer\Connection|string  $hostOrConnection, integer  $port = null) : boolean

Parameters

\Maniaplanet\DedicatedServer\Connection|string $hostOrConnection
integer $port

Returns

boolean

setTimeouts()

setTimeouts(integer  $read = null, integer  $write = null) 

Change client timeouts

Parameters

integer $read

read timeout (in ms), 0 to leave unchanged

integer $write

write timeout (in ms), 0 to leave unchanged

getIdleTime()

getIdleTime() : integer

Returns

integer —

Network idle time in seconds

executeCallbacks()

executeCallbacks() : array<mixed,mixed>

Return pending callbacks

Returns

array<mixed,mixed>

executeMulticall()

executeMulticall() : array<mixed,mixed>

Execute the calls in queue and return the result

Returns

array<mixed,mixed>

execute()

execute(string  $methodName, array<mixed,mixed>  $params = array(), boolean|callable  $multicall = false) : mixed

Add a call in queue. It will be executed by the next Call from the user to executeMulticall

Parameters

string $methodName
array<mixed,mixed> $params
boolean|callable $multicall

True to queue the request or false to execute it immediately

Returns

mixed

authenticate()

authenticate(string  $user, string  $password) : boolean

Allow user authentication by specifying a login and a password, to gain access to the set of functionalities corresponding to this authorization level.

Parameters

string $user
string $password

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

changeAuthPassword()

changeAuthPassword(string  $user, string  $password, boolean  $multicall = false) : boolean

Change the password for the specified login/user.

Only available to SuperAdmin.

Parameters

string $user
string $password
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

enableCallbacks()

enableCallbacks(boolean  $enable = true, boolean  $multicall = false) : boolean

Allow the GameServer to call you back.

Parameters

boolean $enable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

setApiVersion()

setApiVersion(string  $version, boolean  $multicall = false) : boolean

Define the wanted api.

Parameters

string $version
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getVersion()

getVersion(boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\Version

Returns a struct with the Name, TitleId, Version, Build and ApiVersion of the application remotely controlled.

Parameters

boolean $multicall

Returns

\Maniaplanet\DedicatedServer\Structures\Version

quitGame()

quitGame(boolean  $multicall = false) : boolean

Quit the application.

Only available to SuperAdmin.

Parameters

boolean $multicall

Returns

boolean

callVote()

callVote(\Maniaplanet\DedicatedServer\Structures\Vote  $vote, float  $ratio = -1.0, integer  $timeout, integer  $voters = 1, boolean  $multicall = false) : boolean

Call a vote for a command.

You can additionally supply specific parameters for this vote: a ratio, a time out and who is voting. Only available to Admin.

Parameters

\Maniaplanet\DedicatedServer\Structures\Vote $vote
float $ratio

In range [0,1] or -1 for default ratio

integer $timeout

In milliseconds, 0 for default timeout, 1 for indefinite

integer $voters

0: active players, 1: any player, 2: everybody including pure spectators

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

callVoteKick()

callVoteKick(mixed  $player, float  $ratio = 0.5, integer  $timeout, integer  $voters = 1, boolean  $multicall = false) : boolean

Call a vote to kick a player.

You can additionally supply specific parameters for this vote: a ratio, a time out and who is voting. Only available to Admin.

Parameters

mixed $player

A player object or a login

float $ratio

In range [0,1] or -1 for default ratio

integer $timeout

In milliseconds, 0 for default timeout, 1 for indefinite

integer $voters

0: active players, 1: any player, 2: everybody including pure spectators

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

callVoteBan()

callVoteBan(mixed  $player, float  $ratio = 0.6, integer  $timeout, integer  $voters = 1, boolean  $multicall = false) : boolean

Call a vote to ban a player.

You can additionally supply specific parameters for this vote: a ratio, a time out and who is voting. Only available to Admin.

Parameters

mixed $player

A player object or a login

float $ratio

In range [0,1] or -1 for default ratio

integer $timeout

In milliseconds, 0 for default timeout, 1 for indefinite

integer $voters

0: active players, 1: any player, 2: everybody including pure spectators

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

callVoteRestartMap()

callVoteRestartMap(float  $ratio = 0.5, integer  $timeout, integer  $voters = 1, boolean  $multicall = false) : boolean

Call a vote to restart the current map.

You can additionally supply specific parameters for this vote: a ratio, a time out and who is voting. Only available to Admin.

Parameters

float $ratio

In range [0,1] or -1 for default ratio

integer $timeout

In milliseconds, 0 for default timeout, 1 for indefinite

integer $voters

0: active players, 1: any player, 2: everybody including pure spectators

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

callVoteNextMap()

callVoteNextMap(float  $ratio = 0.5, integer  $timeout, integer  $voters = 1, boolean  $multicall = false) : boolean

Call a vote to go to the next map.

You can additionally supply specific parameters for this vote: a ratio, a time out and who is voting. Only available to Admin.

Parameters

float $ratio

In range [0,1] or -1 for default ratio

integer $timeout

In milliseconds, 0 for default timeout, 1 for indefinite

integer $voters

0: active players, 1: any player, 2: everybody including pure spectators

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

cancelVote()

cancelVote(boolean  $multicall = false) : boolean

Cancel the current vote.

Only available to Admin.

Parameters

boolean $multicall

Returns

boolean

getCurrentCallVote()

getCurrentCallVote(  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\Vote

Returns the vote currently in progress.

Parameters

$multicall

Returns

\Maniaplanet\DedicatedServer\Structures\Vote

setCallVoteTimeOut()

setCallVoteTimeOut(integer  $timeout, boolean  $multicall = false) : boolean

Set a new timeout for waiting for votes.

Only available to Admin.

Parameters

integer $timeout

In milliseconds, 0 to disable votes

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getCallVoteTimeOut()

getCallVoteTimeOut(  $multicall = false) : array<mixed,integer>

Get the current and next timeout for waiting for votes.

Parameters

$multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setCallVoteRatio()

setCallVoteRatio(float  $ratio, boolean  $multicall = false) : boolean

Set a new default ratio for passing a vote.

Only available to Admin.

Parameters

float $ratio

In range [0,1] or -1 to disable votes

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getCallVoteRatio()

getCallVoteRatio(boolean  $multicall = false) : float

Get the current default ratio for passing a vote.

Parameters

boolean $multicall

Returns

float

setCallVoteRatios()

setCallVoteRatios(array<mixed,\Maniaplanet\DedicatedServer\Structures\VoteRatio>  $ratios, boolean  $replaceAll = true, boolean  $multicall = false) : boolean

Set the ratios list for passing specific votes, extended version with parameters matching.

Only available to Admin.

Parameters

array<mixed,\Maniaplanet\DedicatedServer\Structures\VoteRatio> $ratios
boolean $replaceAll

True to override the whole ratios list or false to modify only specified ratios

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

setCallVoteRatiosEx()

setCallVoteRatiosEx(  $replaceAll,   $ratios,   $multicall = false) 

Parameters

$replaceAll
$ratios
$multicall

getCallVoteRatios()

getCallVoteRatios(boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\VoteRatio>

Get the current ratios for passing votes, extended version with parameters matching.

Parameters

boolean $multicall

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\VoteRatio>

getCallVoteRatiosEx()

getCallVoteRatiosEx(  $multicall = false) 

Parameters

$multicall

chatSendServerMessage()

chatSendServerMessage(string|array<mixed,string[]>  $message, mixed  $recipient = null, boolean  $multicall = false) : boolean

Send a text message, possibly localised to a specific login or to everyone, without the server login.

Only available to Admin.

Parameters

string|array<mixed,string[]> $message

Single string or array of structures {Lang='xx', Text='...'}: if no matching language is found, the last text in the array is used

mixed $recipient

Login, player object or array; null for all

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

chatSendServerMessageToLanguage()

chatSendServerMessageToLanguage(  $messages,   $recipient = null,   $multicall = false) 

Parameters

$messages
$recipient
$multicall

chatSend()

chatSend(string|array<mixed,string[]>  $message, mixed  $recipient = null, boolean  $multicall = false) : boolean

Send a text message, possibly localised to a specific login or to everyone.

Only available to Admin.

Parameters

string|array<mixed,string[]> $message

Single string or array of structures {Lang='xx', Text='...'}: if no matching language is found, the last text in the array is used

mixed $recipient

Login, player object or array; null for all

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

chatSendToLanguage()

chatSendToLanguage(  $messages,   $recipient = null,   $multicall = false) 

Parameters

$messages
$recipient
$multicall

getChatLines()

getChatLines(boolean  $multicall = false) : array<mixed,string>

Returns the last chat lines. Maximum of 40 lines.

Only available to Admin.

Parameters

boolean $multicall

Returns

array<mixed,string>

chatEnableManualRouting()

chatEnableManualRouting(boolean  $enable = true, boolean  $excludeServer = false, boolean  $multicall = false) : boolean

The chat messages are no longer dispatched to the players, they only go to the rpc callback and the controller has to manually forward them.

Only available to Admin.

Parameters

boolean $enable
boolean $excludeServer

Allows all messages from the server to be automatically forwarded.

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

chatForward()

chatForward(string  $message, mixed  $sender, mixed  $recipient = null, boolean  $multicall = false) : boolean

Send a message to the specified recipient (or everybody if empty) on behalf of sender.

Only available if manual routing is enabled. Only available to Admin.

Parameters

string $message
mixed $sender

Login or player object

mixed $recipient

Login, player object or array; empty for all

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

chatForwardToLogin()

chatForwardToLogin(  $message,   $sender,   $recipient = null,   $multicall = false) 

Parameters

$message
$sender
$recipient
$multicall

sendNotice()

sendNotice(mixed  $recipient, string  $message, mixed  $avatar = null, integer  $variant, boolean  $multicall = false) : boolean

Display a notice on all clients.

Only available to Admin.

Parameters

mixed $recipient

Login, player object or array; empty for all

string $message
mixed $avatar

Login or player object whose avatar will be displayed; empty for none

integer $variant

0: normal, 1: sad, 2: happy

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

sendDisplayManialinkPage()

sendDisplayManialinkPage(mixed  $recipient, string  $manialinks, integer  $timeout, boolean  $hideOnClick = false, boolean  $multicall = false) : boolean

Display a manialink page on all clients.

Only available to Admin.

Parameters

mixed $recipient

Login, player object or array; empty for all

string $manialinks

XML string

integer $timeout

Seconds before autohide, 0 for permanent

boolean $hideOnClick

Hide as soon as the user clicks on a page option

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

sendHideManialinkPage()

sendHideManialinkPage(mixed  $recipient = null, boolean  $multicall = false) : boolean

Hide the displayed manialink page.

Only available to Admin.

Parameters

mixed $recipient

Login, player object or array; empty for all

boolean $multicall

Returns

boolean

getManialinkPageAnswers()

getManialinkPageAnswers(boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\PlayerAnswer>

Returns the latest results from the current manialink page as an array of structs {string Login, int PlayerId, int Result}: - Result == 0 -> no answer - Result > 0 -> answer from the player.

Parameters

boolean $multicall

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\PlayerAnswer>

sendOpenLink()

sendOpenLink(mixed  $recipient, string  $link, integer  $linkType, boolean  $multicall = false) : boolean

Opens a link in the client with the specified login.

Only available to Admin.

Parameters

mixed $recipient

Login, player object or array

string $link

URL to open

integer $linkType

0: in the external browser, 1: in the internal manialink browser

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

sendToServerAfterMatchEnd()

sendToServerAfterMatchEnd(  $link, boolean  $multicall = false) : boolean

Prior to loading next map, execute SendToServer url '#qjoin=login@title' Only available to Admin.

Available since ManiaPlanet 4

Parameters

$link
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

kick()

kick(mixed  $player, string  $message = '', boolean  $multicall = false) : boolean

Kick the player with the specified login, with an optional message.

Only available to Admin.

Parameters

mixed $player

Login or player object

string $message
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

ban()

ban(mixed  $player, string  $message = '', boolean  $multicall = false) : boolean

Ban the player with the specified login, with an optional message.

Only available to Admin.

Parameters

mixed $player

Login or player object

string $message
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

banAndBlackList()

banAndBlackList(mixed  $player, string  $message = '', boolean  $save = false, boolean  $multicall = false) : boolean

Ban the player with the specified login, with a message.

Add it to the black list, and optionally save the new list. Only available to Admin.

Parameters

mixed $player

Login or player object

string $message
boolean $save
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

unBan()

unBan(mixed  $player, boolean  $multicall = false) : boolean

Unban the player with the specified login.

Only available to Admin.

Parameters

mixed $player

Login or player object

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

cleanBanList()

cleanBanList(boolean  $multicall = false) : boolean

Clean the ban list of the server.

Only available to Admin.

Parameters

boolean $multicall

Returns

boolean

getBanList()

getBanList(integer  $length = -1, integer  $offset, boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\PlayerBan>

Returns the list of banned players.

Parameters

integer $length

Maximum number of infos to be returned

integer $offset

Starting index in the list

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\PlayerBan>

blackList()

blackList(mixed  $player, boolean  $multicall = false) : boolean

Blacklist the player with the specified login.

Only available to SuperAdmin.

Parameters

mixed $player

Login or player object

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

unBlackList()

unBlackList(mixed  $player, boolean  $multicall = false) : boolean

UnBlackList the player with the specified login.

Only available to SuperAdmin.

Parameters

mixed $player

Login or player object

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

cleanBlackList()

cleanBlackList(boolean  $multicall = false) : boolean

Clean the blacklist of the server.

Only available to SuperAdmin.

Parameters

boolean $multicall

Returns

boolean

getBlackList()

getBlackList(integer  $length = -1, integer  $offset, boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\Player>

Returns the list of blacklisted players.

Parameters

integer $length

Maximum number of infos to be returned

integer $offset

Starting index in the list

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\Player>

loadBlackList()

loadBlackList(string  $filename = '', boolean  $multicall = false) : boolean

Load the black list file with the specified file name.

Only available to Admin.

Parameters

string $filename

Empty for default filename (blacklist.txt)

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

saveBlackList()

saveBlackList(string  $filename = '', boolean  $multicall = false) : boolean

Save the black list in the file with specified file name.

Only available to Admin.

Parameters

string $filename

Empty for default filename (blacklist.txt)

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

addGuest()

addGuest(mixed  $player, boolean  $multicall = false) : boolean

Add the player with the specified login on the guest list.

Only available to Admin.

Parameters

mixed $player

Login or player object

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

removeGuest()

removeGuest(mixed  $player, boolean  $multicall = false) : boolean

Remove the player with the specified login from the guest list.

Only available to Admin.

Parameters

mixed $player

Login or player object

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

cleanGuestList()

cleanGuestList(boolean  $multicall = false) : boolean

Clean the guest list of the server.

Only available to Admin.

Parameters

boolean $multicall

Returns

boolean

getGuestList()

getGuestList(integer  $length = -1, integer  $offset, boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\Player>

Returns the list of players on the guest list.

Parameters

integer $length

Maximum number of infos to be returned

integer $offset

Starting index in the list

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\Player>

loadGuestList()

loadGuestList(string  $filename = '', boolean  $multicall = false) : boolean

Load the guest list file with the specified file name.

Only available to Admin.

Parameters

string $filename

Empty for default filename (guestlist.txt)

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

saveGuestList()

saveGuestList(string  $filename = '', boolean  $multicall = false) : boolean

Save the guest list in the file with specified file name.

Only available to Admin.

Parameters

string $filename

Empty for default filename (guestlist.txt)

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

setBuddyNotification()

setBuddyNotification(mixed  $player, boolean  $enable, boolean  $multicall = false) : boolean

Sets whether buddy notifications should be sent in the chat.

Only available to Admin.

Parameters

mixed $player

Login or player object; empty for global setting

boolean $enable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getBuddyNotification()

getBuddyNotification(mixed  $player = null, boolean  $multicall = false) : boolean

Gets whether buddy notifications are enabled.

Parameters

mixed $player

Login or player object; empty for global setting

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

writeFile()

writeFile(string  $filename, string  $data, boolean  $multicall = false) : boolean

Write the data to the specified file.

Only available to Admin.

Parameters

string $filename

Relative to the Maps path

string $data
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

writeFileFromFile()

writeFileFromFile(string  $filename, string  $localFilename, boolean  $multicall = false) : boolean

Write the data to the specified file.

Only available to Admin.

Parameters

string $filename

Relative to the Maps path

string $localFilename
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

tunnelSendData()

tunnelSendData(mixed  $recipient, string  $data, boolean  $multicall = false) : boolean

Send the data to the specified player. Login can be a single login or a list of comma-separated logins.

Only available to Admin.

Parameters

mixed $recipient

Login, player object or array

string $data
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

tunnelSendDataFromFile()

tunnelSendDataFromFile(mixed  $recipient, string  $filename, boolean  $multicall = false) : boolean

Send the data to the specified player. Login can be a single login or a list of comma-separated logins.

Only available to Admin.

Parameters

mixed $recipient

Login or player object or array

string $filename
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

dedicatedEcho()

dedicatedEcho(string  $message, string  $callback = '', boolean  $multicall = false) : boolean

Just log the parameters and invoke a callback.

Can be used to talk to other xmlrpc clients connected, or to make custom votes. If used in a callvote, the first parameter will be used as the vote message on the clients. Only available to Admin.

Parameters

string $message
string $callback
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

ignore()

ignore(mixed  $player, boolean  $multicall = false) : boolean

Ignore the player with the specified login.

Only available to Admin.

Parameters

mixed $player

Login or player object

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

unIgnore()

unIgnore(mixed  $player, boolean  $multicall = false) : boolean

Unignore the player with the specified login.

Only available to Admin.

Parameters

mixed $player

Login or player object

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

cleanIgnoreList()

cleanIgnoreList(boolean  $multicall = false) : boolean

Clean the ignore list of the server.

Only available to Admin.

Parameters

boolean $multicall

Returns

boolean

getIgnoreList()

getIgnoreList(integer  $length = -1, integer  $offset, boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\Player>

Returns the list of ignored players.

Parameters

integer $length

Maximum number of infos to be returned

integer $offset

Starting index in the list

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\Player>

pay()

pay(mixed  $payee, integer  $amount, string  $message = '', boolean  $multicall = false) : integer

Pay planets from the server account to a player.

The creation of the transaction itself may cost planets, so you need to have planets on the server account. Only available to Admin.

Parameters

mixed $payee

Login or player object

integer $amount
string $message
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

integer —

BillId

sendBill()

sendBill(mixed  $payer, integer  $amount, string  $message = '', mixed  $payee = null, boolean  $multicall = false) : integer

Create a bill, send it to a player, and return the BillId.

The creation of the transaction itself may cost planets, so you need to have planets on the server account. Only available to Admin.

Parameters

mixed $payer

Login or player object

integer $amount
string $message
mixed $payee

Login or player object; empty for server account

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

integer —

BillId

getBillState()

getBillState(integer  $billId, boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\Bill

Returns the current state of a bill.

Parameters

integer $billId
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

\Maniaplanet\DedicatedServer\Structures\Bill

getServerPlanets()

getServerPlanets(boolean  $multicall = false) : integer

Returns the current number of planets on the server account.

Parameters

boolean $multicall

Returns

integer

getSystemInfo()

getSystemInfo(boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\SystemInfos

Get some system infos, including connection rates (in kbps).

Parameters

boolean $multicall

Returns

\Maniaplanet\DedicatedServer\Structures\SystemInfos

setConnectionRates()

setConnectionRates(integer  $downloadRate, integer  $uploadRate, boolean  $multicall = false) : boolean

Set the download and upload rates (in kbps).

Parameters

integer $downloadRate
integer $uploadRate
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getServerTags()

getServerTags(boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\Tag>

Returns the list of tags and associated values set on this server.

Only available to Admin.

Parameters

boolean $multicall

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\Tag>

setServerTag()

setServerTag(string  $key, string  $value, boolean  $multicall = false) : boolean

Set a tag and its value on the server.

Only available to Admin.

Parameters

string $key
string $value
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

unsetServerTag()

unsetServerTag(string  $key, boolean  $multicall = false) : boolean

Unset the tag with the specified name on the server.

Only available to Admin.

Parameters

string $key
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

resetServerTags()

resetServerTags(boolean  $multicall = false) : boolean

Reset all tags on the server.

Only available to Admin.

Parameters

boolean $multicall

Returns

boolean

setServerName()

setServerName(string  $name, boolean  $multicall = false) : boolean

Set a new server name in utf8 format.

Only available to Admin.

Parameters

string $name
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getServerName()

getServerName(boolean  $multicall = false) : string

Get the server name in utf8 format.

Parameters

boolean $multicall

Returns

string

setServerComment()

setServerComment(string  $comment, boolean  $multicall = false) : boolean

Set a new server comment in utf8 format.

Only available to Admin.

Parameters

string $comment
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getServerComment()

getServerComment(boolean  $multicall = false) : string

Get the server comment in utf8 format.

Parameters

boolean $multicall

Returns

string

setHideServer()

setHideServer(integer  $visibility, boolean  $multicall = false) : boolean

Set whether the server should be hidden from the public server list.

Only available to Admin.

Parameters

integer $visibility

0: visible, 1: always hidden, 2: hidden from nations

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getHideServer()

getHideServer(boolean  $multicall = false) : integer

Get whether the server wants to be hidden from the public server list.

Parameters

boolean $multicall

Returns

integer

isRelayServer()

isRelayServer(boolean  $multicall = false) : boolean

Returns true if this is a relay server.

Parameters

boolean $multicall

Returns

boolean

setServerPassword()

setServerPassword(string  $password, boolean  $multicall = false) : boolean

Set a new password for the server.

Only available to Admin.

Parameters

string $password
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getServerPassword()

getServerPassword(boolean  $multicall = false) : string|boolean

Get the server password if called as Admin or Super Admin, else returns if a password is needed or not.

Parameters

boolean $multicall

Returns

string|boolean

setServerPasswordForSpectator()

setServerPasswordForSpectator(string  $password, boolean  $multicall = false) : boolean

Set a new password for the spectator mode.

Only available to Admin.

Parameters

string $password
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getServerPasswordForSpectator()

getServerPasswordForSpectator(boolean  $multicall = false) : string|boolean

Get the password for spectator mode if called as Admin or Super Admin, else returns if a password is needed or not.

Parameters

boolean $multicall

Returns

string|boolean

setMaxPlayers()

setMaxPlayers(integer  $maxPlayers, boolean  $multicall = false) : boolean

Set a new maximum number of players.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $maxPlayers
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getMaxPlayers()

getMaxPlayers(boolean  $multicall = false) : array<mixed,integer>

Get the current and next maximum number of players allowed on server.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setMaxSpectators()

setMaxSpectators(integer  $maxSpectators, boolean  $multicall = false) : boolean

Set a new maximum number of spectators.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $maxSpectators
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getMaxSpectators()

getMaxSpectators(boolean  $multicall = false) : array<mixed,integer>

Get the current and next maximum number of Spectators allowed on server.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setLobbyInfo()

setLobbyInfo(boolean  $isLobby, integer  $currentPlayers, integer  $maxPlayers, float  $averageLevel, boolean  $multicall = false) : boolean

Declare if the server is a lobby, the number and maximum number of players currently managed by it, and the average level of the players.

Only available to Admin.

Parameters

boolean $isLobby
integer $currentPlayers
integer $maxPlayers
float $averageLevel
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getLobbyInfo()

getLobbyInfo(boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\LobbyInfo

Get whether the server if a lobby, the number and maximum number of players currently managed by it.

Parameters

boolean $multicall

Returns

\Maniaplanet\DedicatedServer\Structures\LobbyInfo

customizeQuitDialog()

customizeQuitDialog(string  $manialink, string  $sendToServer = '', boolean  $askFavorite = true, integer  $quitButtonDelay, boolean  $multicall = false) : boolean

Customize the clients 'leave server' dialog box.

Only available to Admin.

Parameters

string $manialink
string $sendToServer

Server URL, eg. '#qjoin=login@title'

boolean $askFavorite
integer $quitButtonDelay

In milliseconds

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

keepPlayerSlots()

keepPlayerSlots(boolean  $keep = true, boolean  $multicall = false) : boolean

Set whether, when a player is switching to spectator, the server should still consider him a player and keep his player slot, or not.

Only available to Admin.

Parameters

boolean $keep
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

isKeepingPlayerSlots()

isKeepingPlayerSlots(boolean  $multicall = false) : boolean

Get whether the server keeps player slots when switching to spectator.

Parameters

boolean $multicall

Returns

boolean

enableP2PUpload()

enableP2PUpload(boolean  $enable = true, boolean  $multicall = false) : boolean

Enable or disable peer-to-peer upload from server.

Only available to Admin.

Parameters

boolean $enable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

isP2PUpload()

isP2PUpload(boolean  $multicall = false) : boolean

Returns if the peer-to-peer upload from server is enabled.

Parameters

boolean $multicall

Returns

boolean

enableP2PDownload()

enableP2PDownload(boolean  $enable = true, boolean  $multicall = false) : boolean

Enable or disable peer-to-peer download for server.

Only available to Admin.

Parameters

boolean $enable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

isP2PDownload()

isP2PDownload(boolean  $multicall = false) : boolean

Returns if the peer-to-peer download for server is enabled.

Parameters

boolean $multicall

Returns

boolean

allowMapDownload()

allowMapDownload(boolean  $allow = true, boolean  $multicall = false) : boolean

Allow clients to download maps from the server.

Only available to Admin.

Parameters

boolean $allow
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

isMapDownloadAllowed()

isMapDownloadAllowed(boolean  $multicall = false) : boolean

Returns if clients can download maps from the server.

Parameters

boolean $multicall

Returns

boolean

gameDataDirectory()

gameDataDirectory(boolean  $multicall = false) : string

Returns the path of the game datas directory.

Only available to Admin.

Parameters

boolean $multicall

Returns

string

getMapsDirectory()

getMapsDirectory(boolean  $multicall = false) : string

Returns the path of the maps directory.

Only available to Admin.

Parameters

boolean $multicall

Returns

string

getSkinsDirectory()

getSkinsDirectory(boolean  $multicall = false) : string

Returns the path of the skins directory.

Only available to Admin.

Parameters

boolean $multicall

Returns

string

setTeamInfo()

setTeamInfo(string  $name1, float  $color1, string  $path1, string  $name2, float  $color2, string  $path2, boolean  $multicall = false) : boolean

Parameters

string $name1
float $color1
string $path1
string $name2
float $color2
string $path2
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getTeamInfo()

getTeamInfo(integer  $team, boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\Team

Return info for a given team.

Only available to Admin.

Parameters

integer $team

0: no clan, 1 or 2

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

\Maniaplanet\DedicatedServer\Structures\Team

setForcedClubLinks()

setForcedClubLinks(string  $team1, string  $team2, boolean  $multicall = false) : boolean

Set the clublinks to use for the two teams.

Only available to Admin.

Parameters

string $team1
string $team2
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getForcedClubLinks()

getForcedClubLinks(boolean  $multicall = false) : array<mixed,string>

Get the forced clublinks.

Parameters

boolean $multicall

Returns

array<mixed,string>

connectFakePlayer()

connectFakePlayer(boolean  $multicall = false) : string

(debug tool) Connect a fake player to the server and returns the login.

Only available to Admin.

Parameters

boolean $multicall

Returns

string

disconnectFakePlayer()

disconnectFakePlayer(string  $login, boolean  $multicall = false) : boolean

(debug tool) Disconnect a fake player.

Only available to Admin.

Parameters

string $login

Fake player login or '*' for all

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getDemoTokenInfosForPlayer()

getDemoTokenInfosForPlayer(mixed  $player, boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\TokenInfos

Returns the token infos for a player.

Parameters

mixed $player

Login or player object

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

\Maniaplanet\DedicatedServer\Structures\TokenInfos

disableHorns()

disableHorns(boolean  $disable = true, boolean  $multicall = false) : boolean

Disable player horns.

Only available to Admin.

Parameters

boolean $disable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

areHornsDisabled()

areHornsDisabled(boolean  $multicall = false) : boolean

Returns whether the horns are disabled.

Parameters

boolean $multicall

Returns

boolean

disableServiceAnnounces()

disableServiceAnnounces(boolean  $disable = true, boolean  $multicall = false) : boolean

Disable the automatic mesages when a player connects/disconnects from the server.

Only available to Admin.

Parameters

boolean $disable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

areServiceAnnouncesDisabled()

areServiceAnnouncesDisabled(boolean  $multicall = false) : boolean

Returns whether the automatic mesages are disabled.

Parameters

boolean $multicall

Returns

boolean

autoSaveReplays()

autoSaveReplays(boolean  $enable = true, boolean  $multicall = false) : boolean

Enable the autosaving of all replays (vizualisable replays with all players, but not validable) on the server.

Only available to SuperAdmin.

Parameters

boolean $enable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

autoSaveValidationReplays()

autoSaveValidationReplays(boolean  $enable = true, boolean  $multicall = false) : boolean

Enable the autosaving on the server of validation replays, every time a player makes a new time.

Only available to SuperAdmin.

Parameters

boolean $enable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

isAutoSaveReplaysEnabled()

isAutoSaveReplaysEnabled(boolean  $multicall = false) : boolean

Returns if autosaving of all replays is enabled on the server.

Parameters

boolean $multicall

Returns

boolean

isAutoSaveValidationReplaysEnabled()

isAutoSaveValidationReplaysEnabled(boolean  $multicall = false) : boolean

Returns if autosaving of validation replays is enabled on the server.

Parameters

boolean $multicall

Returns

boolean

saveCurrentReplay()

saveCurrentReplay(string  $filename = '', boolean  $multicall = false) : boolean

Saves the current replay (vizualisable replays with all players, but not validable).

Only available to Admin.

Parameters

string $filename

Empty for automatic filename

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

saveBestGhostsReplay()

saveBestGhostsReplay(mixed  $player = null, string  $filename = '', boolean  $multicall = false) : boolean

Saves a replay with the ghost of all the players' best race.

Only available to Admin.

Parameters

mixed $player

Login or player object; empty for all

string $filename

Empty for automatic filename

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getValidationReplay()

getValidationReplay(mixed  $player, boolean  $multicall = false) : string

Returns a replay containing the data needed to validate the current best time of the player.

Parameters

mixed $player

Login or player object

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

string

setLadderMode()

setLadderMode(integer  $mode, boolean  $multicall = false) : boolean

Set a new ladder mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $mode

0: disabled, 1: forced

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getLadderMode()

getLadderMode(boolean  $multicall = false) : array<mixed,integer>

Get the current and next ladder mode on server.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

getLadderServerLimits()

getLadderServerLimits(boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\LadderLimits

Get the ladder points limit for the players allowed on this server.

Parameters

boolean $multicall

Returns

\Maniaplanet\DedicatedServer\Structures\LadderLimits

setVehicleNetQuality()

setVehicleNetQuality(integer  $quality, boolean  $multicall = false) : boolean

Set the network vehicle quality.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $quality

0: fast, 1: high

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getVehicleNetQuality()

getVehicleNetQuality(boolean  $multicall = false) : array<mixed,integer>

Get the current and next network vehicle quality on server.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setServerOptions()

setServerOptions(\Maniaplanet\DedicatedServer\Structures\ServerOptions  $options, boolean  $multicall = false) : boolean

Set new server options using the struct passed as parameters.

Mandatory fields: Name, Comment, Password, PasswordForSpectator, NextCallVoteTimeOut and CallVoteRatio. Ignored fields: LadderServerLimitMin, LadderServerLimitMax and those starting with Current. All other fields are optional and can be set to null to be ignored. Only available to Admin. A change of any field starting with Next requires a map restart to be taken into account.

Parameters

\Maniaplanet\DedicatedServer\Structures\ServerOptions $options
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

setForcedTeams()

setForcedTeams(boolean  $enable, boolean  $multicall = false) : boolean

Set whether the players can choose their side or if the teams are forced by the server (using ForcePlayerTeam()).

Only available to Admin.

Parameters

boolean $enable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getForcedTeams()

getForcedTeams(boolean  $multicall = false) : boolean

Returns whether the players can choose their side or if the teams are forced by the server.

Parameters

boolean $multicall

Returns

boolean

setServerPackMask()

setServerPackMask(string  $packMask, boolean  $multicall = false) : boolean

Defines the packmask of the server.

Only maps matching the packmask will be allowed on the server, so that player connecting to it know what to expect. Only available when the server is stopped. Only available in 2011-08-01 API version. Only available to Admin.

Parameters

string $packMask
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getServerPackMask()

getServerPackMask(boolean  $multicall = false) : string

Get the packmask of the server.

Only available in 2011-08-01 API version.

Parameters

boolean $multicall

Returns

string

setForcedMods()

setForcedMods(boolean  $override, \Maniaplanet\DedicatedServer\Structures\Mod|array<mixed,\Maniaplanet\DedicatedServer\Structures\Mod>  $mods, boolean  $multicall = false) : boolean

Set the mods to apply on the clients.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

boolean $override

If true, even the maps with a mod will be overridden by the server setting

\Maniaplanet\DedicatedServer\Structures\Mod|array<mixed,\Maniaplanet\DedicatedServer\Structures\Mod> $mods

Array of structures [{string Env, string Url}, ...]

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getForcedMods()

getForcedMods(boolean  $multicall = false) : array

Get the mods settings.

Parameters

boolean $multicall

Returns

array —

{bool Override, Structures\Mod[] Mods}

setForcedMusic()

setForcedMusic(boolean  $override, string  $music, boolean  $multicall = false) : boolean

Set the music to play on the clients.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

boolean $override

If true, even the maps with a custom music will be overridden by the server setting

string $music

Url or filename relative to the GameData path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

setForcedSkins()

setForcedSkins(\Maniaplanet\DedicatedServer\Structures\ForcedSkin|array<mixed,\Maniaplanet\DedicatedServer\Structures\ForcedSkin>  $skins, boolean  $multicall = false) : boolean

Defines a list of remappings for player skins.

Will only affect players connecting after the value is set. Only available to Admin.

Parameters

\Maniaplanet\DedicatedServer\Structures\ForcedSkin|array<mixed,\Maniaplanet\DedicatedServer\Structures\ForcedSkin> $skins

List of structs {Orig, Name, Checksum, Url}:

  • Orig is the name of the skin to remap, or '*' for any other
  • Name, Checksum, Url define the skin to use (you may set value '' for any of those, all 3 null means same as Orig).
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getForcedSkins()

getForcedSkins(boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\ForcedSkin>

Get the current forced skins.

Parameters

boolean $multicall

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\ForcedSkin>

getLastConnectionErrorMessage()

getLastConnectionErrorMessage(boolean  $multicall = false) : string

Returns the last error message for an internet connection.

Only available to Admin.

Parameters

boolean $multicall

Returns

string

setRefereePassword()

setRefereePassword(string  $password, boolean  $multicall = false) : boolean

Set a new password for the referee mode.

Only available to Admin.

Parameters

string $password
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getRefereePassword()

getRefereePassword(boolean  $multicall = false) : string|boolean

Get the password for referee mode if called as Admin or Super Admin, else returns if a password is needed or not.

Parameters

boolean $multicall

Returns

string|boolean

setRefereeMode()

setRefereeMode(integer  $mode, boolean  $multicall = false) : boolean

Set the referee validation mode.

Only available to Admin.

Parameters

integer $mode

0: validate the top3 players, 1: validate all players

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getRefereeMode()

getRefereeMode(boolean  $multicall = false) : integer

Get the referee validation mode.

Parameters

boolean $multicall

Returns

integer

setUseChangingValidationSeed()

setUseChangingValidationSeed(boolean  $enable, boolean  $multicall = false) : boolean

Set whether the game should use a variable validation seed or not.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

boolean $enable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getUseChangingValidationSeed()

getUseChangingValidationSeed(boolean  $multicall = false) : array<mixed,boolean>

Get the current and next value of UseChangingValidationSeed.

Parameters

boolean $multicall

Returns

array<mixed,boolean> —

{bool CurrentValue, bool NextValue}

setClientInputsMaxLatency()

setClientInputsMaxLatency(integer  $latency, boolean  $multicall = false) : boolean

Set the maximum time the server must wait for inputs from the clients before dropping data, or '0' for auto-adaptation.

Only used by ShootMania. Only available to Admin.

Parameters

integer $latency
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getClientInputsMaxLatency()

getClientInputsMaxLatency(boolean  $multicall = false) : integer

Get the current ClientInputsMaxLatency.

Only used by ShootMania.

Parameters

boolean $multicall

Returns

integer

setWarmUp()

setWarmUp(boolean  $enable, boolean  $multicall = false) : boolean

Sets whether the server is in warm-up phase or not.

Only available to Admin.

Parameters

boolean $enable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getWarmUp()

getWarmUp(boolean  $multicall = false) : boolean

Returns whether the server is in warm-up phase.

Parameters

boolean $multicall

Returns

boolean

getModeScriptText()

getModeScriptText(boolean  $multicall = false) : string

Get the current mode script.

Parameters

boolean $multicall

Returns

string

setModeScriptText()

setModeScriptText(string  $script, boolean  $multicall = false) : boolean

Set the mode script and restart.

Only available to Admin.

Parameters

string $script
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getModeScriptInfo()

getModeScriptInfo(boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\ScriptInfo

Returns the description of the current mode script.

Parameters

boolean $multicall

Returns

\Maniaplanet\DedicatedServer\Structures\ScriptInfo

getModeScriptSettings()

getModeScriptSettings(boolean  $multicall = false) : array

Returns the current settings of the mode script.

Parameters

boolean $multicall

Returns

array —

{mixed , ...}

setModeScriptSettings()

setModeScriptSettings(array<mixed,mixed>  $settings, boolean  $multicall = false) : boolean

Change the settings of the mode script.

Only available to Admin.

Parameters

array<mixed,mixed> $settings

{mixed , ...}

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

sendModeScriptCommands()

sendModeScriptCommands(array<mixed,mixed>  $commands, boolean  $multicall = false) : boolean

Send commands to the mode script.

Only available to Admin.

Parameters

array<mixed,mixed> $commands

{mixed , ...}

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

setModeScriptSettingsAndCommands()

setModeScriptSettingsAndCommands(array<mixed,mixed>  $settings, array<mixed,mixed>  $commands, boolean  $multicall = false) : boolean

Change the settings and send commands to the mode script.

Only available to Admin.

Parameters

array<mixed,mixed> $settings

{mixed , ...}

array<mixed,mixed> $commands

{mixed , ...}

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getModeScriptVariables()

getModeScriptVariables(boolean  $multicall = false) : array

Returns the current xml-rpc variables of the mode script.

Parameters

boolean $multicall

Returns

array —

{mixed , ...}

setModeScriptVariables()

setModeScriptVariables(array<mixed,mixed>  $variables, boolean  $multicall = false) : boolean

Set the xml-rpc variables of the mode script.

Only available to Admin.

Parameters

array<mixed,mixed> $variables

{mixed , ...}

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

triggerModeScriptEvent()

triggerModeScriptEvent(string  $event, string|array<mixed,string>  $params = '', boolean  $multicall = false) : boolean

Send an event to the mode script.

Only available to Admin.

Parameters

string $event
string|array<mixed,string> $params
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

triggerModeScriptEventArray()

triggerModeScriptEventArray(  $event,   $params = array(),   $multicall = false) 

Parameters

$event
$params
$multicall

getScriptCloudVariables()

getScriptCloudVariables(string  $type, string  $id, boolean  $multicall = false) : array

Get the script cloud variables of given object.

Only available to Admin.

Parameters

string $type
string $id
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

array —

{mixed , ...}

setScriptCloudVariables()

setScriptCloudVariables(string  $type, string  $id, array<mixed,mixed>  $variables, boolean  $multicall = false) : boolean

Set the script cloud variables of given object.

Only available to Admin.

Parameters

string $type
string $id
array<mixed,mixed> $variables

{mixed , ...}

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

restartMap()

restartMap(boolean  $dontClearCupScores = false, boolean  $multicall = false) : boolean

Restarts the map.

Only available to Admin.

Parameters

boolean $dontClearCupScores

Only available in legacy cup mode

boolean $multicall

Returns

boolean

nextMap()

nextMap(boolean  $dontClearCupScores = false, boolean  $multicall = false) : boolean

Switch to next map.

Only available to Admin.

Parameters

boolean $dontClearCupScores

Only available in legacy cup mode

boolean $multicall

Returns

boolean

autoTeamBalance()

autoTeamBalance(boolean  $multicall = false) : boolean

Attempt to balance teams.

Only available to Admin.

Parameters

boolean $multicall

Returns

boolean

stopServer()

stopServer(boolean  $multicall = false) : boolean

Stop the server.

Only available to SuperAdmin.

Parameters

boolean $multicall

Returns

boolean

forceEndRound()

forceEndRound(boolean  $multicall = false) : boolean

In legacy Rounds or Laps mode, force the end of round without waiting for all players to giveup/finish.

Only available to Admin.

Parameters

boolean $multicall

Returns

boolean

setGameInfos()

setGameInfos(\Maniaplanet\DedicatedServer\Structures\GameInfos  $gameInfos, boolean  $multicall = false) : boolean

Set new game settings using the struct passed as parameters.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

\Maniaplanet\DedicatedServer\Structures\GameInfos $gameInfos
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getCurrentGameInfo()

getCurrentGameInfo(boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\GameInfos

Returns a struct containing the current game settings.

Parameters

boolean $multicall

Returns

\Maniaplanet\DedicatedServer\Structures\GameInfos

getNextGameInfo()

getNextGameInfo(boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\GameInfos

Returns a struct containing the game settings for the next map.

Parameters

boolean $multicall

Returns

\Maniaplanet\DedicatedServer\Structures\GameInfos

getGameInfos()

getGameInfos(boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\GameInfos>

Returns a struct containing two other structures, the first containing the current game settings and the second the game settings for next map.

Parameters

boolean $multicall

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\GameInfos> —

{Structures\GameInfos CurrentGameInfos, Structures\GameInfos NextGameInfos}

setGameMode()

setGameMode(integer  $gameMode, boolean  $multicall = false) : boolean

Set a new game mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $gameMode

0: Script, 1: Rounds, 2: TimeAttack, 3: Team, 4: Laps, 5: Cup, 6: Stunt

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getGameMode()

getGameMode(boolean  $multicall = false) : integer

Get the current game mode.

Parameters

boolean $multicall

Returns

integer

setChatTime()

setChatTime(integer  $chatTime, boolean  $multicall = false) : boolean

Set a new chat time value (actually the duration of the podium).

Only available to Admin.

Parameters

integer $chatTime

In milliseconds, 0: no podium displayed

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getChatTime()

getChatTime(boolean  $multicall = false) : array<mixed,integer>

Get the current and next chat time.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setFinishTimeout()

setFinishTimeout(integer  $timeout, boolean  $multicall = false) : boolean

Set a new finish timeout value for legacy laps and rounds based modes.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $timeout

In milliseconds, 0: default, 1: adaptative to the map duration

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getFinishTimeout()

getFinishTimeout(boolean  $multicall = false) : array<mixed,integer>

Get the current and next FinishTimeout.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setAllWarmUpDuration()

setAllWarmUpDuration(integer  $duration, boolean  $multicall = false) : boolean

Set whether to enable the automatic warm-up phase in all modes.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $duration

0: disable, number of rounds in rounds based modes, number of times the gold medal time otherwise

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getAllWarmUpDuration()

getAllWarmUpDuration(boolean  $multicall = false) : array<mixed,integer>

Get whether the automatic warm-up phase is enabled in all modes.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setDisableRespawn()

setDisableRespawn(boolean  $disable, boolean  $multicall = false) : boolean

Set whether to disallow players to respawn.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

boolean $disable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getDisableRespawn()

getDisableRespawn(boolean  $multicall = false) : array<mixed,boolean>

Get whether players are disallowed to respawn.

Parameters

boolean $multicall

Returns

array<mixed,boolean> —

{bool CurrentValue, bool NextValue}

setForceShowAllOpponents()

setForceShowAllOpponents(integer  $opponents, boolean  $multicall = false) : boolean

Set whether to override the players preferences and always display all opponents.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $opponents

0: no override, 1: show all, else: minimum number of opponents

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getForceShowAllOpponents()

getForceShowAllOpponents(boolean  $multicall = false) : array<mixed,integer>

Get whether players are forced to show all opponents.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setScriptName()

setScriptName(string  $script, boolean  $multicall = false) : boolean

Set a new mode script name for script mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

string $script
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getScriptName()

getScriptName(boolean  $multicall = false) : array<mixed,string>

Get the current and next mode script name for script mode.

Parameters

boolean $multicall

Returns

array<mixed,string> —

{string CurrentValue, string NextValue}

setTimeAttackLimit()

setTimeAttackLimit(integer  $limit, boolean  $multicall = false) : boolean

Set a new time limit for legacy time attack mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $limit

In milliseconds

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getTimeAttackLimit()

getTimeAttackLimit(boolean  $multicall = false) : array<mixed,integer>

Get the current and next time limit for legacy time attack mode.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setTimeAttackSynchStartPeriod()

setTimeAttackSynchStartPeriod(integer  $synch, boolean  $multicall = false) : boolean

Set a new synchronized start period for legacy time attack mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $synch
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getTimeAttackSynchStartPeriod()

getTimeAttackSynchStartPeriod(boolean  $multicall = false) : array<mixed,integer>

Get the current and synchronized start period for legacy time attack mode.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setLapsTimeLimit()

setLapsTimeLimit(integer  $limit, boolean  $multicall = false) : boolean

Set a new time limit for legacy laps mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $limit
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getLapsTimeLimit()

getLapsTimeLimit(boolean  $multicall = false) : array<mixed,integer>

Get the current and next time limit for legacy laps mode.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setNbLaps()

setNbLaps(integer  $laps, boolean  $multicall = false) : boolean

Set a new number of laps for legacy laps mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $laps
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getNbLaps()

getNbLaps(boolean  $multicall = false) : array<mixed,integer>

Get the current and next number of laps for legacy laps mode.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setRoundForcedLaps()

setRoundForcedLaps(integer  $laps, boolean  $multicall = false) : boolean

Set a new number of laps for legacy rounds mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $laps

0: map default

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getRoundForcedLaps()

getRoundForcedLaps(boolean  $multicall = false) : array<mixed,integer>

Get the current and next number of laps for rounds mode.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setRoundPointsLimit()

setRoundPointsLimit(integer  $limit, boolean  $multicall = false) : boolean

Set a new points limit for legacy rounds mode (value set depends on UseNewRulesRound).

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $limit
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getRoundPointsLimit()

getRoundPointsLimit(boolean  $multicall = false) : array<mixed,integer>

Get the current and next points limit for rounds mode (values returned depend on UseNewRulesRound).

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setRoundCustomPoints()

setRoundCustomPoints(array<mixed,integer>  $points, boolean  $relax = false, boolean  $multicall = false) : boolean

Set the points used for the scores in legacy rounds mode.

Only available to Admin.

Parameters

array<mixed,integer> $points

Array of decreasing integers for the players from the first to last

boolean $relax

True to relax the constraint checking on the scores

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getRoundCustomPoints()

getRoundCustomPoints(boolean  $multicall = false) : array<mixed,integer>

Gets the points used for the scores in legacy rounds mode.

Parameters

boolean $multicall

Returns

array<mixed,integer>

setUseNewRulesRound()

setUseNewRulesRound(boolean  $newRules, boolean  $multicall = false) : boolean

Set if new rules are used for legacy rounds mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

boolean $newRules
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getUseNewRulesRound()

getUseNewRulesRound(boolean  $multicall = false) : array<mixed,boolean>

Get if the new rules are used for legacy rounds mode (Current and next values).

Parameters

boolean $multicall

Returns

array<mixed,boolean> —

{bool CurrentValue, bool NextValue}

setTeamPointsLimit()

setTeamPointsLimit(integer  $limit, boolean  $multicall = false) : boolean

Set a new points limit for team mode (value set depends on UseNewRulesTeam).

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $limit
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getTeamPointsLimit()

getTeamPointsLimit(boolean  $multicall = false) : array<mixed,integer>

Get the current and next points limit for team mode (values returned depend on UseNewRulesTeam).

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setMaxPointsTeam()

setMaxPointsTeam(integer  $max, boolean  $multicall = false) : boolean

Set a new number of maximum points per round for team mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $max
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getMaxPointsTeam()

getMaxPointsTeam(boolean  $multicall = false) : array<mixed,integer>

Get the current and next number of maximum points per round for team mode.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setUseNewRulesTeam()

setUseNewRulesTeam(boolean  $newRules, boolean  $multicall = false) : boolean

Set if new rules are used for team mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

boolean $newRules
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getUseNewRulesTeam()

getUseNewRulesTeam(boolean  $multicall = false) : array<mixed,boolean>

Get if the new rules are used for team mode (Current and next values).

Parameters

boolean $multicall

Returns

array<mixed,boolean> —

{bool CurrentValue, bool NextValue}

setCupPointsLimit()

setCupPointsLimit(integer  $limit, boolean  $multicall = false) : boolean

Set the points needed for victory in Cup mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $limit
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getCupPointsLimit()

getCupPointsLimit(boolean  $multicall = false) : array<mixed,integer>

Get the points needed for victory in Cup mode.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setCupRoundsPerMap()

setCupRoundsPerMap(integer  $rounds, boolean  $multicall = false) : boolean

Sets the number of rounds before going to next map in Cup mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $rounds
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getCupRoundsPerMap()

getCupRoundsPerMap(boolean  $multicall = false) : array<mixed,integer>

Get the number of rounds before going to next map in Cup mode.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setCupWarmUpDuration()

setCupWarmUpDuration(integer  $duration, boolean  $multicall = false) : boolean

Set whether to enable the automatic warm-up phase in Cup mode.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $duration

Number of rounds, 0: no warm-up

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getCupWarmUpDuration()

getCupWarmUpDuration(boolean  $multicall = false) : array<mixed,integer>

Get whether the automatic warm-up phase is enabled in Cup mode.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

setCupNbWinners()

setCupNbWinners(integer  $winners, boolean  $multicall = false) : boolean

Set the number of winners to determine before the match is considered over.

Only available to Admin. Requires a map restart to be taken into account.

Parameters

integer $winners
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getCupNbWinners()

getCupNbWinners(boolean  $multicall = false) : array<mixed,integer>

Get the number of winners to determine before the match is considered over.

Parameters

boolean $multicall

Returns

array<mixed,integer> —

{int CurrentValue, int NextValue}

getCurrentMapIndex()

getCurrentMapIndex(boolean  $multicall = false) : integer

Returns the current map index in the selection, or -1 if the map is no longer in the selection.

Parameters

boolean $multicall

Returns

integer

getNextMapIndex()

getNextMapIndex(boolean  $multicall = false) : integer

Returns the map index in the selection that will be played next (unless the current one is restarted.

..)

Parameters

boolean $multicall

Returns

integer

setNextMapIndex()

setNextMapIndex(integer  $index, boolean  $multicall = false) : boolean

Sets the map index in the selection that will be played next (unless the current one is restarted.

..)

Parameters

integer $index
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

setNextMapIdent()

setNextMapIdent(string  $ident, boolean  $multicall = false) : boolean

Sets the map in the selection that will be played next (unless the current one is restarted.

..)

Parameters

string $ident
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

jumpToMapIndex()

jumpToMapIndex(integer  $index, boolean  $multicall = false) : boolean

Immediately jumps to the map designated by the index in the selection.

Parameters

integer $index
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

jumpToMapIdent()

jumpToMapIdent(string  $ident, boolean  $multicall = false) : boolean

Immediately jumps to the map designated by its identifier (it must be in the selection).

Parameters

string $ident
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getCurrentMapInfo()

getCurrentMapInfo(boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\Map

Returns a struct containing the infos for the current map.

Parameters

boolean $multicall

Returns

\Maniaplanet\DedicatedServer\Structures\Map

getNextMapInfo()

getNextMapInfo(boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\Map

Returns a struct containing the infos for the next map.

Parameters

boolean $multicall

Returns

\Maniaplanet\DedicatedServer\Structures\Map

getMapInfo()

getMapInfo(string  $filename, boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\Map

Returns a struct containing the infos for the map with the specified filename.

Parameters

string $filename

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

\Maniaplanet\DedicatedServer\Structures\Map

checkMapForCurrentServerParams()

checkMapForCurrentServerParams(string  $filename, boolean  $multicall = false) : boolean

Returns a boolean if the map with the specified filename matches the current server settings.

Parameters

string $filename

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

getMapList()

getMapList(integer  $length = -1, integer  $offset, boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\Map>

Returns a list of maps among the current selection of the server.

Parameters

integer $length

Maximum number of infos to be returned

integer $offset

Starting index in the list

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\Map>

addMap()

addMap(string  $filename, boolean  $multicall = false) : boolean

Add the map with the specified filename at the end of the current selection.

Only available to Admin.

Parameters

string $filename

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

addMapList()

addMapList(array<mixed,string>  $filenames, boolean  $multicall = false) : integer

Add the list of maps with the specified filenames at the end of the current selection.

Only available to Admin.

Parameters

array<mixed,string> $filenames

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

integer —

Number of maps actually added

removeMap()

removeMap(string  $filename, boolean  $multicall = false) : boolean

Remove the map with the specified filename from the current selection.

Only available to Admin.

Parameters

string $filename

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

removeMapList()

removeMapList(array<mixed,string>  $filenames, boolean  $multicall = false) : integer

Remove the list of maps with the specified filenames from the current selection.

Only available to Admin.

Parameters

array<mixed,string> $filenames

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

integer —

Number of maps actually removed

insertMap()

insertMap(string  $filename, boolean  $multicall = false) : boolean

Insert the map with the specified filename after the current map.

Only available to Admin.

Parameters

string $filename

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

insertMapList()

insertMapList(array<mixed,string>  $filenames, boolean  $multicall = false) : integer

Insert the list of maps with the specified filenames after the current map.

Only available to Admin.

Parameters

array<mixed,string> $filenames

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

integer —

Number of maps actually inserted

chooseNextMap()

chooseNextMap(string  $filename, boolean  $multicall = false) : boolean

Set as next map the one with the specified filename, if it is present in the selection.

Only available to Admin.

Parameters

string $filename

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

chooseNextMapList()

chooseNextMapList(array<mixed,string>  $filenames, boolean  $multicall = false) : integer

Set as next maps the list of maps with the specified filenames, if they are present in the selection.

Only available to Admin.

Parameters

array<mixed,string> $filenames

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

integer —

Number of maps actually chosen

loadMatchSettings()

loadMatchSettings(string  $filename, boolean  $multicall = false) : integer

Set a list of maps defined in the playlist with the specified filename as the current selection of the server, and load the gameinfos from the same file.

Only available to Admin.

Parameters

string $filename

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

integer —

Number of maps in the new list

appendPlaylistFromMatchSettings()

appendPlaylistFromMatchSettings(string  $filename, boolean  $multicall = false) : integer

Add a list of maps defined in the playlist with the specified filename at the end of the current selection.

Only available to Admin.

Parameters

string $filename

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

integer —

Number of maps actually added

saveMatchSettings()

saveMatchSettings(string  $filename, boolean  $multicall = false) : integer

Save the current selection of map in the playlist with the specified filename, as well as the current gameinfos.

Only available to Admin.

Parameters

string $filename

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

integer —

Number of maps in the saved playlist

insertPlaylistFromMatchSettings()

insertPlaylistFromMatchSettings(string  $filename, boolean  $multicall = false) : integer

Insert a list of maps defined in the playlist with the specified filename after the current map.

Only available to Admin.

Parameters

string $filename

Relative to the Maps path

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

integer —

Number of maps actually inserted

getPlayerList()

getPlayerList(integer  $length = -1, integer  $offset, integer  $compatibility = 1, boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\PlayerInfo>

Returns the list of players on the server.

Parameters

integer $length

Maximum number of infos to be returned

integer $offset

Starting index in the list

integer $compatibility

0: united, 1: forever, 2: forever including servers

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\PlayerInfo>

getPlayerInfo()

getPlayerInfo(mixed  $player, integer  $compatibility = 1, boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\PlayerInfo

Returns a struct containing the infos on the player with the specified login.

Parameters

mixed $player

Login or player object

integer $compatibility

0: united, 1: forever

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

\Maniaplanet\DedicatedServer\Structures\PlayerInfo

getDetailedPlayerInfo()

getDetailedPlayerInfo(mixed  $player, boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\PlayerDetailedInfo

Returns a struct containing the infos on the player with the specified login.

Parameters

mixed $player

Login or player object

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

\Maniaplanet\DedicatedServer\Structures\PlayerDetailedInfo

getMainServerPlayerInfo()

getMainServerPlayerInfo(integer  $compatibility = 1, boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\PlayerInfo

Returns a struct containing the player infos of the game server (ie: in case of a basic server, itself; in case of a relay server, the main server)

Parameters

integer $compatibility

0: united, 1: forever

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

\Maniaplanet\DedicatedServer\Structures\PlayerInfo

getCurrentRanking()

getCurrentRanking(integer  $length = -1, integer  $offset, boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\PlayerRanking>

Returns the current rankings for the match in progress.

In script modes, scores aren't returned. In team modes, the scores for the two teams are returned. In other modes, it's the individual players' scores.

Parameters

integer $length

Maximum number of infos to be returned

integer $offset

Starting index in the list

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\PlayerRanking>

getCurrentRankingForLogin()

getCurrentRankingForLogin(mixed  $players, boolean  $multicall = false) : array<mixed,\Maniaplanet\DedicatedServer\Structures\PlayerRanking>

Returns the current ranking of the player with the specified login (or list of comma-separated logins) for the match in progress.

In script modes, scores aren't returned. In other modes, it's the individual players' scores.

Parameters

mixed $players

Login, player object or array

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

array<mixed,\Maniaplanet\DedicatedServer\Structures\PlayerRanking>

getCurrentWinnerTeam()

getCurrentWinnerTeam(boolean  $multicall = false) : integer

Returns the current winning team for the race in progress.

Parameters

boolean $multicall

Returns

integer —

-1: if not in team mode or draw match, 0 or 1 otherwise

forceScores()

forceScores(array<mixed,int[]>  $scores, boolean  $silent, boolean  $multicall = false) : boolean

Force the scores of the current game.

Only available in rounds and team mode. Only available to Admin/SuperAdmin.

Parameters

array<mixed,int[]> $scores

Array of structs {int PlayerId, int Score}

boolean $silent

True to update silently (only available for SuperAdmin)

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

forcePlayerTeam()

forcePlayerTeam(mixed  $player, integer  $team, boolean  $multicall = false) : boolean

Force the team of the player.

Only available in team mode. Only available to Admin.

Parameters

mixed $player

Login or player object

integer $team

0 or 1

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

forceSpectator()

forceSpectator(mixed  $player, integer  $mode, boolean  $multicall = false) : boolean

Force the spectating status of the player.

Only available to Admin.

Parameters

mixed $player

Login or player object

integer $mode

0: user selectable, 1: spectator, 2: player, 3: spectator but keep selectable

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

forceSpectatorTarget()

forceSpectatorTarget(mixed  $spectator, mixed  $target, integer  $camera, boolean  $multicall = false) : boolean

Force spectators to look at a specific player.

Only available to Admin.

Parameters

mixed $spectator

Login or player object; empty for all

mixed $target

Login or player object; empty for automatic

integer $camera

-1: leave unchanged, 0: replay, 1: follow, 2: free

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

spectatorReleasePlayerSlot()

spectatorReleasePlayerSlot(mixed  $player, boolean  $multicall = false) : boolean

Pass the login of the spectator.

A spectator that once was a player keeps his player slot, so that he can go back to player mode. Calling this function frees this slot for another player to connect. Only available to Admin.

Parameters

mixed $player

Login or player object

boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

manualFlowControlEnable()

manualFlowControlEnable(boolean  $enable = true, boolean  $multicall = false) : boolean

Enable control of the game flow: the game will wait for the caller to validate state transitions.

Only available to Admin.

Parameters

boolean $enable
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

manualFlowControlProceed()

manualFlowControlProceed(boolean  $multicall = false) : boolean

Allows the game to proceed.

Only available to Admin.

Parameters

boolean $multicall

Returns

boolean

manualFlowControlIsEnabled()

manualFlowControlIsEnabled(boolean  $multicall = false) : integer

Returns whether the manual control of the game flow is enabled.

Only available to Admin.

Parameters

boolean $multicall

Returns

integer —

0: no, 1: yes by the xml-rpc client making the call, 2: yes by some other xml-rpc client

manualFlowControlGetCurTransition()

manualFlowControlGetCurTransition(boolean  $multicall = false) : string

Returns the transition that is currently blocked, or '' if none.

(That's exactly the value last received by the callback.) Only available to Admin.

Parameters

boolean $multicall

Returns

string

checkEndMatchCondition()

checkEndMatchCondition(boolean  $multicall = false) : string

Returns the current match ending condition.

Parameters

boolean $multicall

Returns

string —

'Playing', 'ChangeMap' or 'Finished'

getNetworkStats()

getNetworkStats(boolean  $multicall = false) : \Maniaplanet\DedicatedServer\Structures\NetworkStats

Returns a struct containing the networks stats of the server.

Only available to SuperAdmin.

Parameters

boolean $multicall

Returns

\Maniaplanet\DedicatedServer\Structures\NetworkStats

startServerLan()

startServerLan(boolean  $multicall = false) : boolean

Start a server on lan, using the current configuration.

Only available to SuperAdmin.

Parameters

boolean $multicall

Returns

boolean

startServerInternet()

startServerInternet(boolean  $multicall = false) : boolean

Start a server on internet, using the current configuration.

Only available to SuperAdmin.

Parameters

boolean $multicall

Returns

boolean

joinServerLan()

joinServerLan(string  $host, string  $password = '', boolean  $multicall = false) : boolean

Join the server on lan.

Only available on client. Only available to Admin.

Parameters

string $host

IPv4 with optionally a port (eg. '192.168.1.42:2350')

string $password
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

joinServerInternet()

joinServerInternet(string  $host, string  $password = '', boolean  $multicall = false) : boolean

Join the server on internet.

Only available on client. Only available to Admin.

Parameters

string $host

Server login or IPv4 with optionally a port (eg. '192.168.1.42:2350')

string $password
boolean $multicall

Throws

\Maniaplanet\DedicatedServer\InvalidArgumentException

Returns

boolean

__construct()

__construct(string  $host, integer  $port, integer  $timeout) 

Parameters

string $host
integer $port
integer $timeout

terminate()

terminate() 

Close the current socket connexion Never call this method, use instead DedicatedApi::delete($host, $port)

getLogin()

getLogin(mixed  $player,   $allowEmpty = false) : string|boolean

Returns the login of the given player

Parameters

mixed $player
$allowEmpty

Returns

string|boolean

getLogins()

getLogins(mixed  $players,   $allowEmpty = false) : string|boolean

Returns logins of given players

Parameters

mixed $players
$allowEmpty

Returns

string|boolean

stripBom()

stripBom(string|array<mixed,string>  $str) : string|array<mixed,string>

Parameters

string|array<mixed,string> $str

Returns

string|array<mixed,string>

secureUtf8()

secureUtf8(string|array<mixed,string>  $filename) : string|array<mixed,string>

Parameters

string|array<mixed,string> $filename

Returns

string|array<mixed,string>

structHandler()

structHandler(string  $struct, boolean  $array = false) : callable

Parameters

string $struct
boolean $array

Returns

callable