diff --git a/src/main/java/net/dv8tion/jda/api/events/GenericEvent.java b/src/main/java/net/dv8tion/jda/api/events/GenericEvent.java index d671cd0650..74b2fc9906 100644 --- a/src/main/java/net/dv8tion/jda/api/events/GenericEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/GenericEvent.java @@ -50,6 +50,15 @@ public interface GenericEvent *
This provides the full gateway message payload, including sequence, event name and dispatch type. * For details, read the official Discord Documentation. * + *

Event extensions

+ * Classes extending JDA events may not keep their passthrough data, + * as the data is retrieved from an {@link InheritableThreadLocal}, + * the passthrough data will only be found in instances constructed in the same thread as where the event was originally created, + * or in newly created child threads. + *
This means that existing threads (such as in thread pools) will not contain the passthrough data. + * + *

To fix this issue, you may override this method, and get the passthrough data from the original event. + * * @throws IllegalStateException * If event passthrough was not enabled, see {@link net.dv8tion.jda.api.JDABuilder#setEventPassthrough(boolean) JDABuilder#setEventPassthrough(boolean)} *