Closed ghost closed 3 years ago
code
public static void start() { DiscordEventHandlers handlers = new DiscordEventHandlers(); rpc.Discord_Initialize("795974717890232350", handlers, true, ""); DiscordPresence.presence.startTimestamp = System.currentTimeMillis() / 1000L; DiscordPresence.presence.details = Minecraft.getMinecraft().currentScreen instanceof GuiMainMenu ? "In the main menu." : "Playing " + (Minecraft.getMinecraft().currentServerData != null ? (RPC.INSTANCE.showIP.getValue().booleanValue() ? "on " + Minecraft.getMinecraft().currentServerData.serverIP + "." : " multiplayer.") : " singleplayer."); DiscordPresence.presence.state = RPC.INSTANCE.state.getValue(); DiscordPresence.presence.largeImageKey = "tephra"; DiscordPresence.presence.largeImageText = "Hydrogen 1.4"; rpc.Discord_UpdatePresence(presence); thread = new Thread(() -> { while (!Thread.currentThread().isInterrupted()) { rpc.Discord_RunCallbacks(); DiscordPresence.presence.details = Minecraft.getMinecraft().currentScreen instanceof GuiMainMenu ? "In the main menu." : "Playing " + (Minecraft.getMinecraft().currentServerData != null ? (RPC.INSTANCE.showIP.getValue().booleanValue() ? "on " + Minecraft.getMinecraft().currentServerData.serverIP + "." : " multiplayer.") : " singleplayer."); DiscordPresence.presence.state = RPC.INSTANCE.state.getValue(); if (RPC.INSTANCE.catMode.getValue().booleanValue()) { if (index == 16) { index = 1; } DiscordPresence.presence.largeImageKey = "cat" + index; ++index; } rpc.Discord_UpdatePresence(presence); try { Thread.sleep(2000L); } catch (InterruptedException interruptedException) { } } }, "RPC-Callback-Handler"); thread.start(); }
public static void stop() { if (thread != null && !thread.isInterrupted()) { thread.interrupt(); } rpc.Discord_Shutdown(); }
}
dm me on discord i could give u the notepad++ format
wait this code is broken sorry
code
public static void start() { DiscordEventHandlers handlers = new DiscordEventHandlers(); rpc.Discord_Initialize("795974717890232350", handlers, true, ""); DiscordPresence.presence.startTimestamp = System.currentTimeMillis() / 1000L; DiscordPresence.presence.details = Minecraft.getMinecraft().currentScreen instanceof GuiMainMenu ? "In the main menu." : "Playing " + (Minecraft.getMinecraft().currentServerData != null ? (RPC.INSTANCE.showIP.getValue().booleanValue() ? "on " + Minecraft.getMinecraft().currentServerData.serverIP + "." : " multiplayer.") : " singleplayer."); DiscordPresence.presence.state = RPC.INSTANCE.state.getValue(); DiscordPresence.presence.largeImageKey = "tephra"; DiscordPresence.presence.largeImageText = "Hydrogen 1.4"; rpc.Discord_UpdatePresence(presence); thread = new Thread(() -> { while (!Thread.currentThread().isInterrupted()) { rpc.Discord_RunCallbacks(); DiscordPresence.presence.details = Minecraft.getMinecraft().currentScreen instanceof GuiMainMenu ? "In the main menu." : "Playing " + (Minecraft.getMinecraft().currentServerData != null ? (RPC.INSTANCE.showIP.getValue().booleanValue() ? "on " + Minecraft.getMinecraft().currentServerData.serverIP + "." : " multiplayer.") : " singleplayer."); DiscordPresence.presence.state = RPC.INSTANCE.state.getValue(); if (RPC.INSTANCE.catMode.getValue().booleanValue()) { if (index == 16) { index = 1; } DiscordPresence.presence.largeImageKey = "cat" + index; ++index; } rpc.Discord_UpdatePresence(presence); try { Thread.sleep(2000L); } catch (InterruptedException interruptedException) { } } }, "RPC-Callback-Handler"); thread.start(); }
}