Skip to content

ArenaReturn's fork of Java discord-game-sdk4j, bindings for Discord's Game SDK

License

Notifications You must be signed in to change notification settings

ArenaReturns/discord-game-sdk4j

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discord-game-sdk4j

This project provides Java bindings for the Discord GameSDK.

To be honest I'm not sure if people even need this, because Discord apparently discarded its game store idea.

But maybe the activity, overlay, user, and relationship features could be useful to some people.

Rich Presence

If you are just looking for an alternative to the deprecated Discord Rich Presence SDK, head over to the ActivityExample.java!

Features of the SDK

Some of the features are deprecated by Discord as of Wed, 09 Nov 2022 and will be decommissioned and stop working on Tuesday May 2, 2023. They are marked with 💔 in the table. Those already implemented will most likely continue to work until Discord decommissions them. Those not implemented will remains such, as putting work into features which will end working in less than a year does not seem worth it to me.

The Java-only implementation currently does not support all features fully. I am aiming to fully implement all non-deprecated features soon.

Feature State Example
Achievements ❌ not implemented 💔
Activities ✅ partially implemented ActivityExample.java
Applications ❌ not implemented 💔
Voice ✅ partially implemented 💔
Images ✔️ implemented 💔 none yet 😢 (see imageTest() for now)
Lobbies ❌ not implemented 💔
Networking ❌ not implemented 💔
Overlay ✔️ implemented none yet 😢 (see overlayTest() for now)
Relationships ✔️ implemented RelationshipExample.java, FriendNotificationExample.java
Storage ❌ not implemented 💔
Store ❌ not implemented 💔
Users ✅ partially implemented none yet 😢 (see userTest() for now)

I will try to work on features that are not implemented yet soon, but the remaining ones are quite difficult to test, so I don't know how much progress I can make on them.

Installation

Pre-compiled

Maven, Gradle and other build tools

There are pre-compiled builds on JitPack together with instructions how to use them for all common build tools.

Manual installation

For projects not using any build tools, download a pre-compiled JAR-file (discord-game-sdk4j-<version>.jar) from the releases page.

If you want, you can also download the JavaDocs (discord-game-sdk4j-<version>-javadoc.jar) or the sources (discord-game-sdk4j-<version>-sources.jar).

After downloading those JARs, just add the main JAR to your project's classpath and optionally attach sources or JavaDocs.

Building from source

To install the library from source first of all clone the repository:

git clone https://github.com/ArenaReturns/discord-game-sdk4j.git

Finally build (and install) the library with Maven:

mvn install

If you want to skip the tests (sometimes they fail for really weird reasons), add -DskipTests to the command arguments.

Usage

Create a Core object to start using the library:

try(CreateParams params = new CreateParams())
{
    params.setClientID(<your application ID as a long>);
    params.setFlags(CreateParams.getDefaultFlags());

    try(Core core = new Core(params))
    {
        // do something with your Core
    }
}

For real examples see the examples/ directory in this repository.

About

ArenaReturn's fork of Java discord-game-sdk4j, bindings for Discord's Game SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%