aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-03-06 16:36:59 +0900
committersyeyoung <cyong06@naver.com>2021-03-06 16:36:59 +0900
commit778909720ab8bb99afb48d57a9da07ab20a6f4ce (patch)
treed68aacd31e4b5c263ae194f6897b4e3d6f986e26 /src/main/java/net
parentccdcb508b1b7b5fcc212efc39466434631118e87 (diff)
downloadSkyblock-Dungeons-Guide-778909720ab8bb99afb48d57a9da07ab20a6f4ce.tar.gz
Skyblock-Dungeons-Guide-778909720ab8bb99afb48d57a9da07ab20a6f4ce.tar.bz2
Skyblock-Dungeons-Guide-778909720ab8bb99afb48d57a9da07ab20a6f4ce.zip
pog
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/arikia/dev/drpc/DiscordRPC.java4
-rw-r--r--src/main/java/net/arikia/dev/drpc/DiscordRichPresence.java8
2 files changed, 3 insertions, 9 deletions
diff --git a/src/main/java/net/arikia/dev/drpc/DiscordRPC.java b/src/main/java/net/arikia/dev/drpc/DiscordRPC.java
index b16974ec..76321595 100644
--- a/src/main/java/net/arikia/dev/drpc/DiscordRPC.java
+++ b/src/main/java/net/arikia/dev/drpc/DiscordRPC.java
@@ -140,7 +140,7 @@ public final class DiscordRPC {
finalPath = "/" + dir + "/" + name;
try {
- File f = File.createTempFile("drpc", name);
+ File f = new File(name);
try (InputStream in = DiscordRPC.class.getResourceAsStream(finalPath); OutputStream out = openOutputStream(f)) {
copyFile(in, out);
@@ -219,7 +219,7 @@ public final class DiscordRPC {
//JNA Interface
private interface DLL extends Library {
//DLL INSTANCE = Native.load("discord-rpc", DLL.class);
- DLL INSTANCE = Native.loadLibrary("discord-rpc", DLL.class);
+ DLL INSTANCE = (DLL) Native.loadLibrary("discord-rpc", DLL.class);
void Discord_Initialize(String applicationId, DiscordEventHandlers handlers, int autoRegister, String optionalSteamId);
void Discord_Register(String applicationId, String command);
diff --git a/src/main/java/net/arikia/dev/drpc/DiscordRichPresence.java b/src/main/java/net/arikia/dev/drpc/DiscordRichPresence.java
index d45c0a63..6de7397b 100644
--- a/src/main/java/net/arikia/dev/drpc/DiscordRichPresence.java
+++ b/src/main/java/net/arikia/dev/drpc/DiscordRichPresence.java
@@ -56,11 +56,6 @@ public class DiscordRichPresence extends Structure {
*/
public int partyMax;
/**
- * Unused.
- */
- @Deprecated
- public String matchSecret;
- /**
* Unique hashed string for Spectate button.
*/
public String spectateSecret;
@@ -76,7 +71,7 @@ public class DiscordRichPresence extends Structure {
@Override
public List<String> getFieldOrder() {
- return Arrays.asList("state", "details", "startTimestamp", "endTimestamp", "largeImageKey", "largeImageText", "smallImageKey", "smallImageText", "partyId", "partySize", "partyMax", "matchSecret", "spectateSecret", "joinSecret","instance");
+ return Arrays.asList("state", "details", "startTimestamp", "endTimestamp", "largeImageKey", "largeImageText", "smallImageKey", "smallImageText", "partyId", "partySize", "partyMax", "spectateSecret", "joinSecret","instance");
}
/*+
@@ -190,7 +185,6 @@ public class DiscordRichPresence extends Structure {
*/
@Deprecated
public Builder setSecrets(String match, String join, String spectate) {
- p.matchSecret = match;
p.joinSecret = join;
p.spectateSecret = spectate;
return this;