java.lang.Object
net.foxgenesis.watame.WatameBot.ProtectedJDABuilder
- Enclosing class:
- WatameBot
-
Method Summary
Modifier and TypeMethodDescriptionaddEventListeners(Object... listeners) Adds all provided listeners to the list of listeners that will be used to populate theJDAobject.removeEventListeners(Object... listeners) Removes all provided listeners from the list of listeners.
-
Method Details
-
addEventListeners
Adds all provided listeners to the list of listeners that will be used to populate theJDAobject.
This uses theInterfacedEventListenerby default.
To switch to theAnnotatedEventManager, usesetEventManager(new AnnotatedEventManager()).Note: When using the
InterfacedEventListener(default), given listener(s) must be instance ofEventListener!- Parameters:
listeners- The listener(s) to add to the list.- Returns:
- The JDABuilder instance. Useful for chaining.
- Throws:
IllegalArgumentException- If either listeners or one of it's objects isnull.- See Also:
-
JDA.addEventListener(Object...)
-
removeEventListeners
Removes all provided listeners from the list of listeners.- Parameters:
listeners- The listener(s) to remove from the list.- Returns:
- The JDABuilder instance. Useful for chaining.
- Throws:
IllegalArgumentException- If either listeners or one of it's objects isnull.- See Also:
-
JDA.removeEventListener(Object...)
-