Skip to content
This repository was archived by the owner on Feb 8, 2019. It is now read-only.

Commit 8d513d8

Browse files
committed
Add PhaseTask
1 parent 5b6011a commit 8d513d8

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* Copyright (c) 2018 VectorNetworkProject. All rights reserved. MIT license.
4+
*
5+
* GitHub: https://github.com/VectorNetworkProject/TheMix
6+
* Website: https://www.vector-network.tk
7+
*/
8+
9+
namespace VectorNetworkProject\TheMix\task;
10+
11+
12+
use pocketmine\scheduler\Task;
13+
14+
class PhaseTask extends Task
15+
{
16+
/** @var int $time */
17+
private $time;
18+
19+
/**
20+
* PhaseTask constructor.
21+
*
22+
* @param int $time
23+
*/
24+
public function __construct(int $time = 600)
25+
{
26+
$this->time = $time;
27+
}
28+
29+
public function onRun(int $currentTick)
30+
{
31+
// TODO: Implement onRun() method.
32+
}
33+
34+
/**
35+
* @return string
36+
*/
37+
public function getTime(): string
38+
{
39+
return gmdate('i:s', $this->time);
40+
}
41+
}

0 commit comments

Comments
 (0)