Signed-off-by: Aaron Brock <TheMineBench@gmail.com>
This commit is contained in:
Aaron Brock 2015-07-01 21:59:38 -04:00
parent dec7d55fb0
commit 0920c27040

View File

@ -24,7 +24,7 @@ class GameStateCountdown extends PluginTask implements Listener {
private $count;
private $gameStateComponent;
private $arena;
private $task;
private $startGameState;
private $setGameState;
@ -54,13 +54,15 @@ class GameStateCountdown extends PluginTask implements Listener {
if ($event->getToGameState() == $this->startGameState)
{
Server::getInstance()->getScheduler()->scheduleRepeatingTask($this, 20);
$this->task = Server::getInstance()->getScheduler()->scheduleRepeatingTask($this, 20);
}
else
{
$this->count = $this->startCount;
$this->task->cancel();
Server::getInstance()->getScheduler()->cancelTask($this->getTaskId());
}
}