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

Commit 9324d21

Browse files
InkoHXStyleCIBot
authored andcommitted
Apply fixes from StyleCI
[ci skip] [skip ci]
1 parent d948e3d commit 9324d21

File tree

3 files changed

+29
-19
lines changed

3 files changed

+29
-19
lines changed

src/VectorNetworkProject/TheMix/command/defaults/ModeratorCommand.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
namespace VectorNetworkProject\TheMix\command\defaults;
1010

11-
1211
use pocketmine\command\CommandSender;
1312
use pocketmine\command\PluginCommand;
1413
use pocketmine\level\Position;
@@ -32,13 +31,14 @@ public function __construct(Plugin $owner)
3231
{
3332
parent::__construct('moderator', $owner);
3433
$this->setDescription('モデレーター専用メニュー(管理権限持ちのユーザー以外使用不可能)');
35-
$this->setPermission(Permissions::ADMIN . 'moderator');
34+
$this->setPermission(Permissions::ADMIN.'moderator');
3635
}
3736

3837
/**
3938
* @param CommandSender $sender
40-
* @param string $commandLabel
41-
* @param array $args
39+
* @param string $commandLabel
40+
* @param array $args
41+
*
4242
* @return bool|mixed
4343
*/
4444
public function execute(CommandSender $sender, string $commandLabel, array $args)
@@ -48,14 +48,17 @@ public function execute(CommandSender $sender, string $commandLabel, array $args
4848
}
4949
$sender instanceof Player
5050
? self::sendModeratorUI($sender)
51-
: $sender->sendMessage(TextFormat::RED . 'プレイヤーのみ実行可能です。') ;
51+
: $sender->sendMessage(TextFormat::RED.'プレイヤーのみ実行可能です。');
52+
5253
return true;
5354
}
5455

5556
public static function sendModeratorUI(Player $player): void
5657
{
5758
$form = FormApi::makeListForm(function (Player $player, ?int $data) {
58-
if (FormApi::formCancelled($data)) return;
59+
if (FormApi::formCancelled($data)) {
60+
return;
61+
}
5962
switch ($data) {
6063
case 0:
6164
self::sendLevelManagerUI($player);
@@ -71,7 +74,9 @@ public static function sendModeratorUI(Player $player): void
7174
public static function sendLevelManagerUI(Player $player): void
7275
{
7376
$form = FormApi::makeListForm(function (Player $player, ?int $data) {
74-
if (FormApi::formCancelled($data)) return;
77+
if (FormApi::formCancelled($data)) {
78+
return;
79+
}
7580
switch ($data) {
7681
case 0:
7782
$player->teleport(Server::getInstance()->getDefaultLevel()->getSpawnLocation());

src/VectorNetworkProject/TheMix/event/TheBlockPlaceEvent.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
namespace VectorNetworkProject\TheMix\event;
1010

11-
1211
use pocketmine\event\block\BlockPlaceEvent;
1312
use pocketmine\event\Listener;
1413
use pocketmine\math\Vector2;

src/VectorNetworkProject/TheMix/game/DefaultConfig.php

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ public static function init()
2929
{
3030
$db = new YAML();
3131
$db->init([
32-
'version' => TheMix::PLUGIN_CONFIG_VERSION,
33-
'develop-mode' => true,
32+
'version' => TheMix::PLUGIN_CONFIG_VERSION,
33+
'develop-mode' => true,
3434
'stage-world-name' => 'stage',
35-
'event-time' => 30,
36-
'red' => [
35+
'event-time' => 30,
36+
'red' => [
3737
'safe' => [
38-
'x' => 353,
39-
'z' => 203,
38+
'x' => 353,
39+
'z' => 203,
4040
'diameter' => 30,
4141
],
4242
'spawn' => [
@@ -48,12 +48,12 @@ public static function init()
4848
'x' => 215,
4949
'y' => 445,
5050
'z' => 455,
51-
]
51+
],
5252
],
5353
'blue' => [
5454
'safe' => [
55-
'x' => 157,
56-
'z' => 203,
55+
'x' => 157,
56+
'z' => 203,
5757
'diameter' => 30,
5858
],
5959
'spawn' => [
@@ -65,14 +65,15 @@ public static function init()
6565
'x' => 215,
6666
'y' => 445,
6767
'z' => 455,
68-
]
69-
]
68+
],
69+
],
7070
]);
7171
}
7272

7373
public static function getStageLevelName(): string
7474
{
7575
$db = new YAML();
76+
7677
return $db->get(self::STAGE_NAME);
7778
}
7879

@@ -82,32 +83,37 @@ public static function getStageLevelName(): string
8283
public static function getStageWorld(): ?Level
8384
{
8485
$db = new YAML();
86+
8587
return Server::getInstance()->getLevelByName($db->get(self::STAGE_NAME));
8688
}
8789

8890
public static function isDev(): bool
8991
{
9092
$db = new YAML();
93+
9194
return $db->get(self::DEVELOP_MODE);
9295
}
9396

9497
public static function getEventTime(): int
9598
{
9699
$db = new YAML();
100+
97101
return $db->get(self::EVENT_TIME);
98102
}
99103

100104
public static function getRedSafe(): array
101105
{
102106
$db = new YAML();
103107
$safe = $db->get(self::RED);
108+
104109
return $safe['safe'];
105110
}
106111

107112
public static function getBlueSafe(): array
108113
{
109114
$db = new YAML();
110115
$safe = $db->get(self::BLUE);
116+
111117
return $safe['safe'];
112118
}
113119
}

0 commit comments

Comments
 (0)