Skip to content

Commit 156d16c

Browse files
committed
Disable FakePlayer on disconnect
1 parent 3af2f41 commit 156d16c

File tree

1 file changed

+6
-0
lines changed
  • common/src/main/kotlin/com/lambda/module/modules/combat

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
package com.lambda.module.modules.combat
1919

2020
import com.lambda.context.SafeContext
21+
import com.lambda.event.events.ConnectionEvent
22+
import com.lambda.event.listener.SafeListener.Companion.listen
2123
import com.lambda.http.Method
2224
import com.lambda.http.request
2325
import com.lambda.module.Module
@@ -71,6 +73,10 @@ object FakePlayer : Module(
7173
}
7274

7375
onShutdown { disable() }
76+
77+
listen<ConnectionEvent.Disconnect> {
78+
disable()
79+
}
7480
}
7581

7682
private fun SafeContext.spawnPlayer(profile: GameProfile) {

0 commit comments

Comments
 (0)