Skip to content

Expose staff chat and isolate module resources#102

Merged
Taahh merged 1 commit into
masterfrom
agent/staff-chat-api
Jul 22, 2026
Merged

Expose staff chat and isolate module resources#102
Taahh merged 1 commit into
masterfrom
agent/staff-chat-api

Conversation

@Taahh

@Taahh Taahh commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a cancellable StaffChatMessageEvent for toggled and command-based staff chat
  • expose staff-chat mode through PlexPlayerView.staffChat()
  • allow listeners to replace or cancel a staff-chat message before delivery
  • make PlexModule.getResource() prefer resources from the module JAR itself
  • route module configuration and migrations through the corrected resource API

Why

Modules currently cannot reliably observe staff chat: toggled staff messages are cancelled internally, direct /adminchat <message> calls emit no chat event, and the public player view does not expose staff-chat mode. This adds supported integration points without requiring modules to depend on Plex server internals.

Module resource loading also delegated to Plex first. A module requesting a common path such as config.yml could therefore receive Plex’s own bundled file. Resource lookup now searches the module URL classloader directly, and the existing migration-specific workaround is consolidated into the public resource method.

The new player-view method has a default implementation to preserve compatibility for third-party PlexPlayerView implementations. Redis-received staff messages intentionally do not fire the local-origin event.

Validation

  • ./gradlew :api:javadoc :server:compileJava
  • Discord bridge ./gradlew clean build with a bundled config.yml
  • git diff --check

@Taahh
Taahh marked this pull request as ready for review July 22, 2026 00:46
@Taahh
Taahh merged commit 406c7ef into master Jul 22, 2026
5 checks passed
@Taahh Taahh changed the title Expose staff chat through the public API Expose staff chat and isolate module resources Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant