Skip to content

Commit

Permalink
fix: use launch instead of async
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff committed Sep 28, 2024
1 parent c30b17f commit 0cebf76
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,16 @@ object DungeonListener {
} else if (text == "§r§aStarting in 1 second.§r") {
Skytils.launch {
delay(2000)
if (DungeonTimer.dungeonStartTime != -1L/* && team.size > 1*/) {
if (DungeonTimer.dungeonStartTime != -1L && team.size > 1) {
val party = async {
ServerboundPartyInfoPacket().getResponse<ClientboundPartyInfoPacket>()
}
val partyMembers = party.await().members.ifEmpty { setOf(mc.thePlayer.uniqueID) }.mapTo(hashSetOf()) { it.toString() }
val entrance = DungeonInfo.uniqueRooms.first { it.mainRoom.data.type == RoomType.ENTRANCE }
printDevMessage("hi", "dungeonws")
async(IO.coroutineContext) {
launch(IO.coroutineContext) {
WSClient.sendPacketAsync(C2SPacketDungeonStart(
serverId = SBInfo.server ?: return@async,
serverId = SBInfo.server ?: return@launch,
floor = DungeonFeatures.dungeonFloor!!,
members = partyMembers,
startTime = DungeonTimer.dungeonStartTime,
Expand Down

0 comments on commit 0cebf76

Please sign in to comment.