Stuff
Signed-off-by: Aaron Brock <TheMineBench@gmail.com>
This commit is contained in:
parent
dec7d55fb0
commit
0920c27040
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user