Package de.jcm.discordgamesdk
Class DiscordEventAdapter
java.lang.Object
de.jcm.discordgamesdk.DiscordEventAdapter
- Direct Known Subclasses:
DiscordEventHandler
Adapter class for Discord events.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onActivityJoin
(String secret) Fires when the user attempts to join a game by accepting an invite.void
Fires when a user asked to join the user by using "Ask to join" button.void
onActivitySpectate
(String secret) Fires when the user attempts to spectate a game by accepting an invite or using the "spectate"-button.void
Fires when the current user changes their user information (avatar, username, etc.).void
onOverlayToggle
(boolean locked) Fires when the overlay is toggled (locked / unlocked).void
Fires when there is a new cached version of the user's relationships.void
onRelationshipUpdate
(Relationship relationship) Fires when information about a relationship (also user, presence, etc.) in the filtered list changes.
-
Constructor Details
-
DiscordEventAdapter
public DiscordEventAdapter()
-
-
Method Details
-
onActivityJoin
Fires when the user attempts to join a game by accepting an invite.- Parameters:
secret
- The join or the match secret of the activity- See Also:
-
onActivitySpectate
Fires when the user attempts to spectate a game by accepting an invite or using the "spectate"-button.- Parameters:
secret
- The spectate secret of the activity- See Also:
-
onActivityJoinRequest
Fires when a user asked to join the user by using "Ask to join" button.- Parameters:
user
- User that requested to join- See Also:
-
onCurrentUserUpdate
public void onCurrentUserUpdate()Fires when the current user changes their user information (avatar, username, etc.).
Also fires after initialization of the
UserManager
and therefore indicates thatUserManager.getCurrentUser()
is ready to be called.- See Also:
-
onOverlayToggle
public void onOverlayToggle(boolean locked) Fires when the overlay is toggled (locked / unlocked).
Apparently also fires after initialization of the
OverlayManager
and therefore tells you the initial overlay state.- Parameters:
locked
- Current state of the overlay- See Also:
-
onRelationshipRefresh
public void onRelationshipRefresh()Fires when there is a new cached version of the user's relationships.
Also fires after initialization of the
RelationshipManager
and therefore indicates that its methods can be used to fetch relationship information.- See Also:
-
onRelationshipUpdate
Fires when information about a relationship (also user, presence, etc.) in the filtered list changes.- Parameters:
relationship
- New relationship information- See Also:
-