spelling fixed
(canceled -> cancelled)
This commit is contained in:
parent
b36eff12bc
commit
4d5e0ee6b0
@ -30,7 +30,7 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer
|
||||
const ACTION_EXTEND_WARMUP = 'ServerCommands.ExtendWarmup';
|
||||
const ACTION_END_WARMUP = 'ServerCommands.EndWarmup';
|
||||
const ACTION_CANCEL_VOTE = 'ServerCommands.CancelVote';
|
||||
const CB_VOTE_CANCELED = 'ServerCommands.VoteCanceled';
|
||||
const CB_VOTE_CANCELLED = 'ServerCommands.VoteCancelled';
|
||||
const SETTING_PERMISSION_CANCEL_VOTE = 'Cancel Vote';
|
||||
const SETTING_PERMISSION_SET_PAUSE = 'Set Pause';
|
||||
const SETTING_PERMISSION_HANDLE_WARMUP = 'Handle Warmup';
|
||||
@ -167,8 +167,8 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer
|
||||
}
|
||||
|
||||
if ($this->maniaControl->client->cancelVote()) {
|
||||
$this->maniaControl->chat->sendInformation($player->getEscapedNickname() . ' canceled the Vote!');
|
||||
$this->maniaControl->callbackManager->triggerCallback(self::CB_VOTE_CANCELED, $player);
|
||||
$this->maniaControl->chat->sendInformation($player->getEscapedNickname() . ' cancelled the Vote!');
|
||||
$this->maniaControl->callbackManager->triggerCallback(self::CB_VOTE_CANCELLED, $player);
|
||||
} else {
|
||||
$this->maniaControl->chat->sendInformation("There's no vote running currently!", $player);
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
||||
use ManiaControl\Players\Player;
|
||||
use ManiaControl\Players\PlayerManager;
|
||||
use ManiaControl\Plugins\Plugin;
|
||||
use ManiaControl\Server\Server;
|
||||
use ManiaControl\Server\Commands;
|
||||
use ManiaControl\Server\Server;
|
||||
use ManiaControl\Utils\ColorUtil;
|
||||
use Maniaplanet\DedicatedServer\Structures\VoteRatio;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\ChangeInProgressException;
|
||||
@ -134,7 +134,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
||||
|
||||
$this->maniaControl->commandManager->registerCommandListener('vote', $this, 'chat_vote', false, 'Starts a new vote.');
|
||||
$this->maniaControl->timerManager->registerTimerListening($this, 'handle1Second', 1000);
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(Commands::CB_VOTE_CANCELED, $this, 'handleVoteCanceled');
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(Commands::CB_VOTE_CANCELLED, $this, 'handleVoteCancelled');
|
||||
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_POSITIVE_VOTE, $this, 'handlePositiveVote');
|
||||
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_NEGATIVE_VOTE, $this, 'handleNegativeVote');
|
||||
|
||||
@ -501,9 +501,9 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy the Vote on Canceled Callback
|
||||
* Destroy the Vote on Cancelled Callback
|
||||
*/
|
||||
public function handleVoteCanceled() {
|
||||
public function handleVoteCancelled() {
|
||||
$this->destroyVote();
|
||||
}
|
||||
|
||||
@ -822,15 +822,6 @@ class VoteCommand {
|
||||
$this->neededRatio = $neededRatio;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines a Stop Callback
|
||||
*
|
||||
* @param $stopCallback
|
||||
*/
|
||||
public function setStopCallback($stopCallback) {
|
||||
$this->stopCallback = $stopCallback;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Stop Callback
|
||||
*
|
||||
@ -840,6 +831,15 @@ class VoteCommand {
|
||||
return $this->stopCallback;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines a Stop Callback
|
||||
*
|
||||
* @param $stopCallback
|
||||
*/
|
||||
public function setStopCallback($stopCallback) {
|
||||
$this->stopCallback = $stopCallback;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user