Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

Conversation

@twisti-dev
Copy link
Contributor

  • Added AfkStateChangeEvent to track player AFK state changes.
  • Updated player implementation to use AtomicBoolean for thread-safe AFK state management.
  • Integrated AfkStateChangeEvent posting in AFK state update logic across client and standalone modules.

- Added `AfkStateChangeEvent` to track player AFK state changes.
- Updated player implementation to use `AtomicBoolean` for thread-safe AFK state management.
- Integrated `AfkStateChangeEvent` posting in AFK state update logic across client and standalone modules.
@twisti-dev twisti-dev self-assigned this Aug 16, 2025
Copilot AI review requested due to automatic review settings August 16, 2025 22:05
@github-project-automation github-project-automation bot moved this to Backlog in surf-cloud Aug 16, 2025
@twisti-dev twisti-dev moved this from Backlog to In progress in surf-cloud Aug 16, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new event system for tracking AFK (Away From Keyboard) state changes and improves thread safety in AFK state management. The implementation adds proper event notification when players transition between AFK and active states.

  • Added AfkStateChangeEvent to notify when player AFK status changes
  • Replaced simple boolean with AtomicBoolean for thread-safe AFK state management in standalone implementation
  • Integrated event posting in both client and standalone modules when AFK state updates

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
surf-cloud-api/surf-cloud-api-common/src/main/kotlin/dev/slne/surf/cloud/api/common/event/player/afk/AfkStateChangeEvent.kt Defines the new event class for AFK state changes
surf-cloud-standalone/src/main/kotlin/dev/slne/surf/cloud/standalone/player/StandaloneCloudPlayerImpl.kt Updates AFK state management to use AtomicBoolean and posts AfkStateChangeEvent
surf-cloud-core/surf-cloud-core-client/src/main/kotlin/dev/slne/surf/cloud/core/client/netty/network/ClientRunningPacketListenerImpl.kt Adds event posting when receiving AFK state updates via network packets

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@twisti-dev twisti-dev merged commit 4349257 into master Aug 16, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in surf-cloud Aug 16, 2025
@twisti-dev twisti-dev deleted the feat/afk-event branch August 16, 2025 22:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants