Skip to content

Commit 3fd3626

Browse files
committed
FakePlayer crash fix
1 parent 64218f1 commit 3fd3626

File tree

1 file changed

+5
-1
lines changed
  • common/src/main/kotlin/com/lambda/module/modules/combat

1 file changed

+5
-1
lines changed

common/src/main/kotlin/com/lambda/module/modules/combat/FakePlayer.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ import com.lambda.http.request
2525
import com.lambda.module.Module
2626
import com.lambda.module.tag.ModuleTag
2727
import com.lambda.threading.onShutdown
28+
import com.lambda.threading.runGameScheduled
2829
import com.lambda.threading.runSafeConcurrent
30+
import com.lambda.threading.runSafeGameScheduled
2931
import com.mojang.authlib.GameProfile
3032
import net.minecraft.client.network.OtherClientPlayerEntity
3133
import net.minecraft.client.network.PlayerListEntry
@@ -88,7 +90,9 @@ object FakePlayer : Module(
8890
id = -2024 - 4 - 20
8991
}
9092

91-
world.addEntity(fakePlayer)
93+
runSafeGameScheduled {
94+
world.addEntity(fakePlayer)
95+
}
9296
}
9397

9498
private fun deletePlayer() {

0 commit comments

Comments
 (0)