Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Vankka
Copy link
Member

@Vankka Vankka commented Apr 16, 2025

There is no way to listen for events without knowing the entire class name.
The current hack to get around this is to register a listener to every event, but this comes with various problems such as:

  • Performance problems (some events trigger very frequently)
    • Being unable to unregister from unused events reliably, due to some events sharing their HandlerList (see below attempted fix and resulting lag problems)
  • Having to replace the allLists field value to detect new events being added to it

Fixes GH-1793 (In cases where no simple names are used)
Fixes GH-1814

Docs PR: DiscordSRV/Documentation#85

@ANutley
Copy link
Member

ANutley commented Jun 15, 2025

# - Trigger: <event name or /command>

Would it be worth changing this to something along the lines of "event fully qualified class name", however we may want something simpler that the average server owner would understand?

@Vankka Vankka linked an issue Jun 15, 2025 that may be closed by this pull request
2 tasks
@Vankka Vankka force-pushed the feat/alerts-fully-qualified-class-names branch from e6dbac6 to 81d8360 Compare June 15, 2025 21:02
@OakLoaf
Copy link

OakLoaf commented Jul 23, 2025

Is this safe to compile and use in production? Or is there anything currently holding it back?

Vankka added a commit that referenced this pull request Jul 23, 2025
@Vankka Vankka closed this Jul 23, 2025
@granny granny deleted the feat/alerts-fully-qualified-class-names branch July 25, 2025 00:11
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.

Alerts don't work on Paper 1.21.5+

3 participants