This repository was archived by the owner on Feb 8, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +40
-0
lines changed
src/VectorNetworkProject/TheMix Expand file tree Collapse file tree 6 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 16
16
17
17
class PingCommand extends PluginCommand
18
18
{
19
+ /**
20
+ * PingCommand constructor.
21
+ * @param Plugin $owner
22
+ */
19
23
public function __construct (Plugin $ owner )
20
24
{
21
25
parent ::__construct ('ping ' , $ owner );
22
26
$ this ->setDescription ('応答速度を計測します。 ' );
23
27
$ this ->setPermission ('the.mix.command.ping ' );
24
28
}
25
29
30
+ /**
31
+ * @param CommandSender $sender
32
+ * @param string $commandLabel
33
+ * @param array $args
34
+ *
35
+ * @return bool
36
+ */
26
37
public function execute (CommandSender $ sender , string $ commandLabel , array $ args ): bool
27
38
{
28
39
if (!$ sender instanceof Player) {
Original file line number Diff line number Diff line change 16
16
17
17
class TpsCommand extends PluginCommand
18
18
{
19
+ /**
20
+ * TpsCommand constructor.
21
+ * @param Plugin $owner
22
+ */
19
23
public function __construct (Plugin $ owner )
20
24
{
21
25
parent ::__construct ('tps ' , $ owner );
22
26
$ this ->setPermission ('the.mix.command.tps ' );
23
27
$ this ->setDescription ('TicksPerSecond ' );
24
28
}
25
29
30
+ /**
31
+ * @param CommandSender $sender
32
+ * @param string $commandLabel
33
+ * @param array $args
34
+ *
35
+ * @return bool
36
+ */
26
37
public function execute (CommandSender $ sender , string $ commandLabel , array $ args ): bool
27
38
{
28
39
$ sender ->sendMessage (TextFormat::GREEN .'TPS: ' .Server::getInstance ()->getTicksPerSecond ().'/20 ' );
Original file line number Diff line number Diff line change 12
12
13
13
abstract class Provider
14
14
{
15
+ /**
16
+ * @param string $folder
17
+ * @param string $type
18
+ *
19
+ * @return string
20
+ */
15
21
protected static function getPath (string $ folder , string $ type ): string
16
22
{
17
23
return TheMix::getInstance ()->getDataFolder ().'/ ' .$ folder .'/ ' .$ type .'/ ' ;
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ public function deleteTable(): void
73
73
/**
74
74
* @param string $key
75
75
* @param bool|mixed $data
76
+ *
77
+ * @return void
76
78
*/
77
79
public function set (string $ key , $ data ): void
78
80
{
Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ public function deleteTable(): bool
65
65
/**
66
66
* @param string $key
67
67
* @param bool|mixed $data
68
+ *
69
+ * @return void
68
70
*/
69
71
public function set (string $ key , $ data ): void
70
72
{
Original file line number Diff line number Diff line change @@ -20,12 +20,20 @@ class UpdateScoreboardTask extends Task
20
20
/* @var Player $player */
21
21
private $ player ;
22
22
23
+ /**
24
+ * UpdateScoreboardTask constructor.
25
+ * @param Scoreboard $scoreboard
26
+ * @param Player $player
27
+ */
23
28
public function __construct (Scoreboard $ scoreboard , Player $ player )
24
29
{
25
30
$ this ->scoreboard = $ scoreboard ;
26
31
$ this ->player = $ player ;
27
32
}
28
33
34
+ /**
35
+ * @param int $currentTick
36
+ */
29
37
public function onRun (int $ currentTick )
30
38
{
31
39
if (!$ this ->player ->isOnline ()) {
You can’t perform that action at this time.
0 commit comments