Package de.jcm.discordgamesdk
Class DiscordEventAdapter
java.lang.Object
de.jcm.discordgamesdk.DiscordEventAdapter
- Direct Known Subclasses:
DiscordEventHandler
Adapter class for Discord events.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonActivityJoin(String secret) Fires when the user attempts to join a game by accepting an invite.voidFires when a user asked to join the user by using "Ask to join" button.voidonActivitySpectate(String secret) Fires when the user attempts to spectate a game by accepting an invite or using the "spectate"-button.voidFires when the current user changes their user information (avatar, username, etc.).voidonOverlayToggle(boolean locked) Fires when the overlay is toggled (locked / unlocked).voidFires when there is a new cached version of the user's relationships.voidonRelationshipUpdate(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
UserManagerand 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
OverlayManagerand 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
RelationshipManagerand 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:
-