Skip to content

Commit 83684da

Browse files
authored
Update README.md
1 parent 30dbefb commit 83684da

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ public function loadWorlds(): Channel
9494
if ($world === "." || $world === "..") continue;
9595
if ($this->plugin->getManager()->isIslandNether($world)) {
9696
$i++;
97-
yield from $channel->send($i);
97+
yield from $channel->sendGen($i);
9898
$this->applyIslandNether($world);
9999
} elseif ($this->plugin->getManager()->isIslandEnd($world)) {
100100
$i++;
101-
yield from $channel->send($i);
101+
yield from $channel->sendGen($i);
102102
$this->applyIslandEnd($world);
103103
} else {
104104
$this->applyIslandOverworld($world);
@@ -119,10 +119,7 @@ if (
119119
self::$doneLoadWorlds = $this->plugin->getWorldManager()->loadWorlds();
120120
} elseif (self::$doneLoadWorlds !== null) {
121121
CoroutineGen::runNonBlocking(function (): Generator {
122-
$receive = self::$doneLoadWorlds->receiveGen();
123-
while ($receive !== null) {
124-
$receive = yield from self::$doneLoadWorlds->receiveGen();
125-
}
122+
yield from self::$doneLoadWorlds->receiveGen(fn() => null);
126123
self::$doneLoadWorlds = null;
127124
});
128125
}

0 commit comments

Comments
 (0)