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

Commit 16915b1

Browse files
committed
Fixes #16
1 parent 4991d1e commit 16915b1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/VectorNetworkProject/TheMix/task/ReSpawnCooldownTask.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ public function __construct(Player $player, Position $position)
3838
*/
3939
public function onRun(int $currentTick)
4040
{
41-
if (!$this->player->isOnline()) $this->getHandler()->cancel();
41+
if (!$this->player->isOnline()) {
42+
return;
43+
}
4244
$this->player->setGamemode(Player::SURVIVAL);
4345
$this->player->teleport($this->position);
4446
$this->player->sendMessage(TextFormat::GREEN.'行動可能になりました。');

src/VectorNetworkProject/TheMix/task/UpdateScoreboardTask.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function onRun(int $currentTick)
4444
{
4545
if (!$this->player->isOnline()) {
4646
$this->getHandler()->cancel();
47+
return;
4748
}
4849
$scoreboard = $this->scoreboard;
4950
$scoreboard->setLine($this->player, 0, '§7'.date('Y/m/d H:i:s'));

0 commit comments

Comments
 (0)