Overview

Namespaces

  • DedicatedApi
    • Structures
    • Xmlrpc
  • ManiaLib
    • Gui
      • Cards
        • Dialogs
        • Navigation
      • Elements
      • Layouts
      • Maniacode
        • Elements
    • Utils
  • ManiaLive
    • Application
    • Config
    • Data
    • Database
      • MySQL
      • SQLite
    • DedicatedApi
      • Callback
    • Event
    • Features
      • Admin
      • ChatCommand
      • Tick
      • WebServices
    • Gui
      • Controls
      • Elements
      • Windows
    • PluginHandler
    • Threading
    • Utilities
  • ManiaLiveApplication
  • Maniaplanet
    • WebServices
      • ManiaConnect
      • ManiaHome
      • Rankings
  • PHP

Classes

  • Command
  • Interpreter

Exceptions

  • CommandAlreadyRegisteredException
  • Overview
  • Namespace
  • Class
  • Tree

Class Interpreter

ManiaLib\Utils\Singleton
Extended by ManiaLive\Features\ChatCommand\Interpreter implements ManiaLive\DedicatedApi\Callback\Listener
Final
Namespace: ManiaLive\Features\ChatCommand
Located at libraries/ManiaLive/Features/ChatCommand/Interpreter.php
Methods summary
protected
# __construct( )

Overrides

ManiaLib\Utils\Singleton::__construct()
public
# register( ManiaLive\Features\ChatCommand\Command $command )

Use this method to register a new Command Once register the command can be used

Use this method to register a new Command Once register the command can be used

Parameters

$command
ManiaLive\Features\ChatCommand\Command
$command
public integer
# isRegistered( string $commandName, integer $parametersCount = -2 )

Check if the given command with the number of argument given exists

Check if the given command with the number of argument given exists

Parameters

$commandName
string
$commandName the name of the command
$parametersCount
integer
$parametersCount the number of argument

Returns

integer
public ManiaLive\Features\ChatCommand\Command[]
# getRegisteredCommands( )

Get the registerd Commands

Get the registerd Commands

Returns

ManiaLive\Features\ChatCommand\Command[]
The list of registerd Command
public
# unregister( ManiaLive\Features\ChatCommand\Command $command )

Unregister the given Command Once unregistered a command is no more available

Unregister the given Command Once unregistered a command is no more available

Parameters

$command
ManiaLive\Features\ChatCommand\Command
$command
public
# onPlayerChat( integer $playerUid, string $login, string $text, boolean $isRegistredCmd )

Method called when a Player chat on the server

Method called when a Player chat on the server

Parameters

$playerUid
integer
$playerUid
$login
string
$login
$text
string
$text
$isRegistredCmd
boolean
$isRegistredCmd

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onPlayerChat()
public
# help( mixed $login )
public
# man( mixed $login, mixed $commandName, mixed $parametersCount = -2 )
public
# onPlayerConnect( string $login, boolean $isSpectator )

Method called when a Player join the server

Method called when a Player join the server

Parameters

$login
string
$login
$isSpectator
boolean
$isSpectator

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onPlayerConnect()
public
# onPlayerDisconnect( string $login )

Method called when a Player quit the server

Method called when a Player quit the server

Parameters

$login
string
$login

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onPlayerDisconnect()
public
# onPlayerManialinkPageAnswer( integer $playerUid, string $login, integer $answer, array $entries )

Method called when a Answer to a Manialink Page difference with previous TM: this is not called if the player doesn't answer, and thus '0' is also a valid answer.

Method called when a Answer to a Manialink Page difference with previous TM: this is not called if the player doesn't answer, and thus '0' is also a valid answer.

Parameters

$playerUid
integer
$playerUid
$login
string
$login
$answer
integer
$answer
$entries

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onPlayerManialinkPageAnswer()
public
# onEcho( string $internal, string $public )

Method called when the dedicated Method Echo is called

Method called when the dedicated Method Echo is called

Parameters

$internal
string
$internal
$public
string
$public

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onEcho()
public
# onServerStart( )

Method called when the server starts

Method called when the server starts

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onServerStart()
public
# onServerStop( )

Method called when the server stops

Method called when the server stops

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onServerStop()
public
# onBeginMatch( )

Method called when the Race Begin

Method called when the Race Begin

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onBeginMatch()
public
# onEndMatch( SPlayerRanking[] $rankings, integer|SMapInfo $winnerTeamOrMap )

Method called when the Race Ended struct of SPlayerRanking is a part of the structure of DedicatedApi\Structures\Player object struct SPlayerRanking { string Login; string NickName; int PlayerId; int Rank; [for legacy TrackMania modes also: int BestTime; int[] BestCheckpoints; int Score; int NbrLapsFinished; double LadderScore; ] }

Method called when the Race Ended struct of SPlayerRanking is a part of the structure of DedicatedApi\Structures\Player object struct SPlayerRanking { string Login; string NickName; int PlayerId; int Rank; [for legacy TrackMania modes also: int BestTime; int[] BestCheckpoints; int Score; int NbrLapsFinished; double LadderScore; ] }

Parameters

$rankings
SPlayerRanking[]
$rankings
$winnerTeamOrMap
integer|SMapInfo
$winnerTeamOrMap Winner team if API version >= 2012-06-19, else the map

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onEndMatch()
public
# onBeginMap( SMapInfo $map, boolean $warmUp, boolean $matchContinuation )

Method called when a map begin

Method called when a map begin

Parameters

$map
SMapInfo
$map
$warmUp
boolean
$warmUp
$matchContinuation
boolean
$matchContinuation

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onBeginMap()
public
# onEndMap( SPlayerRanking[] $rankings, SMapInfo $map, boolean $wasWarmUp, boolean $matchContinuesOnNextMap, boolean $restartMap )

Method called when a map end

Method called when a map end

Parameters

$rankings
SPlayerRanking[]
$rankings
$map
SMapInfo
$map
$wasWarmUp
boolean
$wasWarmUp
$matchContinuesOnNextMap
boolean
$matchContinuesOnNextMap
$restartMap
boolean
$restartMap

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onEndMap()
public
# onBeginRound( )

Method called on Round beginning

Method called on Round beginning

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onBeginRound()
public
# onEndRound( )

Method called on Round ending

Method called on Round ending

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onEndRound()
public
# onStatusChanged( integer $statusCode, string $statusName )

Method called when the server status change

Method called when the server status change

Parameters

$statusCode
integer
StatusCode
$statusName
string
StatsName

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onStatusChanged()
public
# onPlayerCheckpoint( integer $playerUid, string $login, integer $timeOrScore, integer $curLap, integer $checkpointIndex )

Method called when a player cross a checkPoint

Method called when a player cross a checkPoint

Parameters

$playerUid
integer
$playerUid
$login
string
$login
$timeOrScore
integer
$timeOrScore
$curLap
integer
$curLap
$checkpointIndex
integer
$checkpointIndex

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onPlayerCheckpoint()
public
# onPlayerFinish( integer $playerUid, string $login, integer $timeOrScore )

Method called when a player finish a round

Method called when a player finish a round

Parameters

$playerUid
integer
$playerUid
$login
string
$login
$timeOrScore
integer
$timeOrScore

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onPlayerFinish()
public
# onPlayerIncoherence( integer $playerUid, string $login )

Method called when there is an incoherence with a player data

Method called when there is an incoherence with a player data

Parameters

$playerUid
integer
$playerUid
$login
string
$login

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onPlayerIncoherence()
public
# onBillUpdated( integer $billId, integer $state, string $stateName, integer $transactionId )

Method called when a bill is updated

Method called when a bill is updated

Parameters

$billId
integer
$billId
$state
integer
$state
$stateName
string
$stateName
$transactionId
integer
$transactionId

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onBillUpdated()
public
# onTunnelDataReceived( integer $playerUid, string $login, base64 $data )

Method called server receive data

Method called server receive data

Parameters

$playerUid
integer
$playerUid
$login
string
$login
$data
base64
$data

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onTunnelDataReceived()
public
# onMapListModified( integer $curMapIndex, integer $nextMapIndex, boolean $isListModified )

Method called when the map list is modified

Method called when the map list is modified

Parameters

$curMapIndex
integer
$curMapIndex
$nextMapIndex
integer
$nextMapIndex
$isListModified
boolean
$isListModified

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onMapListModified()
public
# onPlayerInfoChanged( SPlayerInfo $playerInfo )

Method called when player info changed

Method called when player info changed

Parameters

$playerInfo
SPlayerInfo
$playerInfo

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onPlayerInfoChanged()
public
# onManualFlowControlTransition( string $transition )

Method called when the Flow Control is manual

Method called when the Flow Control is manual

Parameters

$transition
string
$transition

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onManualFlowControlTransition()
public
# onVoteUpdated( string $stateName, string $login, string $cmdName, string $cmdParam )

Method called when a vote change of State

Method called when a vote change of State

Parameters

$stateName
string
$stateName can be NewVote, VoteCancelled, votePassed, voteFailed
$login
string
$login the login of the player who start the vote if empty the server start the vote
$cmdName
string
$cmdName the command used for the vote
$cmdParam
string
$cmdParam the parameters of the vote

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onVoteUpdated()
public
# onModeScriptCallback( string $param1, string $param2 )

Parameters

$param1
string
$param2
string

Implementation of

ManiaLive\DedicatedApi\Callback\Listener::onModeScriptCallback()
Methods inherited from ManiaLib\Utils\Singleton
__clone(), getInstance()
Constants summary
integer NOT_REGISTERED_AT_ALL 0
#
integer REGISTERED_DIFFERENTLY 1
#
integer REGISTERED_AS_POLYMORPHIC 2
#
integer REGISTERED_EXACTLY 3
#
Properties inherited from ManiaLib\Utils\Singleton
$instances
ManiaLiveDoc API documentation generated by ApiGen 2.8.0