public static class RichPresence.Builder
extends java.lang.Object
RichPresence
object.
An accurate description of each field and it's functions can be found here
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
RichPresence |
build()
Builds the
RichPresence from the current state of this builder. |
RichPresence.Builder |
setDetails(java.lang.String details)
Sets details of what the player is currently doing.
|
RichPresence.Builder |
setEndTimestamp(java.time.OffsetDateTime endTimestamp)
Sets the time that the player's current activity will end.
|
RichPresence.Builder |
setInstance(boolean instance)
Marks the
matchSecret as a game session with a specific beginning and end. |
RichPresence.Builder |
setJoinSecret(java.lang.String joinSecret)
Sets the unique hashed string for chat invitations and Ask to Join.
|
RichPresence.Builder |
setLargeImage(java.lang.String largeImageKey)
Sets the key of the uploaded image for the large profile artwork.
|
RichPresence.Builder |
setLargeImage(java.lang.String largeImageKey,
java.lang.String largeImageText)
Sets the key of the uploaded image for the large profile artwork, as well as the text tooltip shown when a cursor
hovers over it.
|
RichPresence.Builder |
setMatchSecret(java.lang.String matchSecret)
Sets the unique hashed string for Spectate and Join.
|
RichPresence.Builder |
setParty(java.lang.String partyId,
int partySize,
int partyMax)
Sets party configurations for a team, lobby, or other form of group.
|
RichPresence.Builder |
setSmallImage(java.lang.String smallImageKey)
Sets the key of the uploaded image for the small profile artwork.
|
RichPresence.Builder |
setSmallImage(java.lang.String smallImageKey,
java.lang.String smallImageText)
Sets the key of the uploaded image for the small profile artwork, as well as the text tooltip shown when a cursor
hovers over it.
|
RichPresence.Builder |
setSpectateSecret(java.lang.String spectateSecret)
Sets the unique hashed string for Spectate button.
|
RichPresence.Builder |
setStartTimestamp(java.time.OffsetDateTime startTimestamp)
Sets the time that the player started a match or activity.
|
RichPresence.Builder |
setState(java.lang.String state)
Sets the state of the user's current party.
|
public RichPresence build()
RichPresence
from the current state of this builder.public RichPresence.Builder setState(java.lang.String state)
state
- The state of the user's current party.public RichPresence.Builder setDetails(java.lang.String details)
details
- The details of what the player is currently doing.public RichPresence.Builder setStartTimestamp(java.time.OffsetDateTime startTimestamp)
startTimestamp
- The time the player started a match or activity.public RichPresence.Builder setEndTimestamp(java.time.OffsetDateTime endTimestamp)
endTimestamp
- The time the player's activity will end.public RichPresence.Builder setLargeImage(java.lang.String largeImageKey, java.lang.String largeImageText)
These can be configured in the applications page on the discord website.
largeImageKey
- A key to an image to display.largeImageText
- Text displayed when a cursor hovers over the large image.public RichPresence.Builder setLargeImage(java.lang.String largeImageKey)
These can be configured in the applications page on the discord website.
largeImageKey
- A key to an image to display.public RichPresence.Builder setSmallImage(java.lang.String smallImageKey, java.lang.String smallImageText)
These can be configured in the applications page on the discord website.
smallImageKey
- A key to an image to display.smallImageText
- Text displayed when a cursor hovers over the small image.public RichPresence.Builder setSmallImage(java.lang.String smallImageKey)
These can be configured in the applications page on the discord website.
smallImageKey
- A key to an image to display.public RichPresence.Builder setParty(java.lang.String partyId, int partySize, int partyMax)
The partyId
is ID of the player's party.
The partySize
is the current size of the player's party.
The partyMax
is the maximum number of player's allowed in the party.
partyId
- The ID of the player's party.partySize
- The current size of the player's party.partyMax
- The maximum number of player's allowed in the party.public RichPresence.Builder setMatchSecret(java.lang.String matchSecret)
matchSecret
- The unique hashed string for Spectate and Join.public RichPresence.Builder setJoinSecret(java.lang.String joinSecret)
joinSecret
- The unique hashed string for chat invitations and Ask to Join.public RichPresence.Builder setSpectateSecret(java.lang.String spectateSecret)
spectateSecret
- The unique hashed string for Spectate button.public RichPresence.Builder setInstance(boolean instance)
matchSecret
as a game session with a specific beginning and end.instance
- Whether or not the matchSecret
is a game with a specific beginning and end.