Constants

PLUGIN_ID

PLUGIN_ID

PLUGIN_VERSION

PLUGIN_VERSION

PLUGIN_NAME

PLUGIN_NAME

PLUGIN_AUTHOR

PLUGIN_AUTHOR

SETTING_VOTE_ICON_POSX

SETTING_VOTE_ICON_POSX

SETTING_VOTE_ICON_POSY

SETTING_VOTE_ICON_POSY

SETTING_VOTE_ICON_WIDTH

SETTING_VOTE_ICON_WIDTH

SETTING_VOTE_ICON_HEIGHT

SETTING_VOTE_ICON_HEIGHT

SETTING_WIDGET_POSX

SETTING_WIDGET_POSX

SETTING_WIDGET_POSY

SETTING_WIDGET_POSY

SETTING_WIDGET_WIDTH

SETTING_WIDGET_WIDTH

SETTING_WIDGET_HEIGHT

SETTING_WIDGET_HEIGHT

SETTING_VOTE_TIME

SETTING_VOTE_TIME

SETTING_DEFAULT_PLAYER_RATIO

SETTING_DEFAULT_PLAYER_RATIO

SETTING_DEFAULT_RATIO

SETTING_DEFAULT_RATIO

SETTING_SPECTATOR_ALLOW_VOTE

SETTING_SPECTATOR_ALLOW_VOTE

SETTING_SPECTATOR_ALLOW_START_VOTE

SETTING_SPECTATOR_ALLOW_START_VOTE

MLID_WIDGET

MLID_WIDGET

MLID_ICON

MLID_ICON

ACTION_POSITIVE_VOTE

ACTION_POSITIVE_VOTE

ACTION_NEGATIVE_VOTE

ACTION_NEGATIVE_VOTE

ACTION_START_VOTE

ACTION_START_VOTE

CB_CUSTOM_VOTE_FINISHED

CB_CUSTOM_VOTE_FINISHED

Properties

$voteCommands

$voteCommands : 

Type

$voteMenuItems

$voteMenuItems : 

Type

Methods

prepare()

prepare(\ManiaControl\ManiaControl  $maniaControl) 

Prepare the Plugin

Parameters

\ManiaControl\ManiaControl $maniaControl

getId()

getId() : integer

Get plugin id

Returns

integer

getName()

getName() : string

Get Plugin Name

Returns

string

getVersion()

getVersion() : string

Get Plugin Version

Returns

string

getAuthor()

getAuthor() : string

Get Plugin Author

Returns

string

getDescription()

getDescription() : string

Get Plugin Description

Returns

string

load()

load(\ManiaControl\ManiaControl  $maniaControl) : boolean

Load the plugin

Parameters

\ManiaControl\ManiaControl $maniaControl

Returns

boolean

defineVote()

defineVote(integer  $voteIndex, string  $voteName, boolean  $idBased = false, string  $startText = '', float  $neededRatio = -1) : \MCTeam\VoteCommand

Define a Vote

Parameters

integer $voteIndex
string $voteName
boolean $idBased
string $startText
float $neededRatio

Returns

\MCTeam\VoteCommand

addVoteMenuItem()

addVoteMenuItem(\FML\Controls\Control  $control, integer  $order, string  $description = null) 

Add a new Vote Menu Item

Parameters

\FML\Controls\Control $control
integer $order
string $description

unload()

unload() 

Unload the plugin and its Resources

handlePlayerConnect()

handlePlayerConnect(\ManiaControl\Players\Player  $player) 

Handle PlayerConnect callback

Parameters

\ManiaControl\Players\Player $player

chat_vote()

chat_vote(array  $chat, \ManiaControl\Players\Player  $player) 

Chat Vote

Parameters

array $chat
\ManiaControl\Players\Player $player

startVote()

startVote(\ManiaControl\Players\Player  $player, integer  $voteIndex, callable  $function = null) 

Start a vote

Parameters

\ManiaControl\Players\Player $player
integer $voteIndex
callable $function

calls the given function only if the vote is successful and returns as Parameter the Voting-Results

handleStopCallback()

handleStopCallback() 

Destroys the Vote on the Stop Callback

handleVoteCancelled()

handleVoteCancelled() 

Destroy the Vote on Cancelled Callback

handleVoteFinished()

handleVoteFinished(string  $voteName, float  $voteResult) 

Handle Standard Votes

Parameters

string $voteName
float $voteResult

handleManialinkPageAnswer()

handleManialinkPageAnswer(array  $callback) 

Handles the ManialinkPageAnswers and start a vote if a button in the panel got clicked

Parameters

array $callback

handleChatVote()

handleChatVote(array  $chat, \ManiaControl\Players\Player  $player) 

Handle a Player Chat Vote

Parameters

array $chat
\ManiaControl\Players\Player $player

undefineVote()

undefineVote(integer  $voteIndex) 

Undefine a Vote

Parameters

integer $voteIndex

handlePositiveVote()

handlePositiveVote(array  $callback, \ManiaControl\Players\Player  $player) 

Handles a Positive Vote

Parameters

array $callback
\ManiaControl\Players\Player $player

handleNegativeVote()

handleNegativeVote(array  $callback, \ManiaControl\Players\Player  $player) 

Handles a negative Vote

Parameters

array $callback
\ManiaControl\Players\Player $player

handle1Second()

handle1Second() 

Handle ManiaControl 1 Second Callback

showIcon()

showIcon(boolean  $login = false) 

Shows the Icon Widget

Parameters

boolean $login

destroyVote()

destroyVote() 

Destroys the current Vote

showVoteWidget()

showVoteWidget(integer  $timeUntilExpire, float  $votePercentage) 

Show the vote widget

Parameters

integer $timeUntilExpire
float $votePercentage