File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
common/src/main/kotlin/com/lambda/module/modules/combat Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import com.lambda.config.groups.InteractionSettings
2121import com.lambda.config.groups.RotationSettings
2222import com.lambda.config.groups.Targeting
2323import com.lambda.context.SafeContext
24+ import com.lambda.event.events.ConnectionEvent
2425import com.lambda.event.events.EntityEvent
2526import com.lambda.event.events.RenderEvent
2627import com.lambda.event.events.TickEvent
@@ -158,6 +159,20 @@ object CrystalAura : Module(
158159 possibleExplodeOpportunities.clear()
159160 possiblePlaceOpportunities.clear()
160161 }
162+
163+ onDisable { clear() }
164+ listen<ConnectionEvent .Disconnect > { clear() }
165+ }
166+
167+ private fun clear () {
168+ pendingPlacements.clear()
169+ possiblePlaceOpportunities.clear()
170+ pendingExplosions.clear()
171+ possibleExplodeOpportunities.clear()
172+
173+ placementRequest = null
174+ explosionRequest = null
175+ rotationRequest = null
161176 }
162177
163178 private fun SafeContext.determineActionForNextTick () {
You can’t perform that action at this time.
0 commit comments