Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
toidicakhia committed Nov 21, 2023
1 parent ede309f commit cbebe40
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ configurations {
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
include("com.jagrosh:DiscordIPC:0.4")
compile "com.github.MinusMCNetwork:MinusBounce:0.1.1"
}

shadowJar {
Expand Down
Binary file removed libs/minusbounce-20231001.jar
Binary file not shown.
26 changes: 2 additions & 24 deletions src/main/java/net/minusmc/discordrpcplugin/DiscordRPCPlugin.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package net.minusmc.discordrpcplugin

import net.minusmc.minusbounce.plugin.Plugin
import net.minusmc.minusbounce.plugin.PluginAPIVersion
import net.minusmc.minusbounce.event.EventTarget
import net.minusmc.minusbounce.event.ClientShutdownEvent
import net.minusmc.minusbounce.utils.ClientUtils
import kotlin.concurrent.thread

class DiscordRPCPlugin: Plugin("DiscordRPCPlugin", "20231005") {
class DiscordRPCPlugin: Plugin("DiscordRPCPlugin", "dev", PluginAPIVersion.VER_01) {

lateinit var clientRichPresence: ClientRichPresence

Expand All @@ -27,27 +28,4 @@ class DiscordRPCPlugin: Plugin("DiscordRPCPlugin", "20231005") {
fun onShutDown(event: ClientShutdownEvent) {
clientRichPresence.shutdown()
}

// } else if (extendedModMode) {
// val rpc = LiquidBounce.clientRichPresence
// rpc.showRichPresenceValue = when (val state = !rpc.showRichPresenceValue) {
// false -> {
// rpc.shutdown()
// false
// }
// true -> {
// var value = true
// thread {
// value = try {
// rpc.setup()
// true
// } catch (throwable: Throwable) {
// ClientUtils.getLogger().error("Failed to setup Discord RPC.", throwable)
// false
// }
// }
// value
// }
// }
// }
}
13 changes: 13 additions & 0 deletions src/main/java/net/minusmc/discordrpcplugin/GuiDiscordRPC.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package net.minusmc.discordrpcplugin

import net.minecraft.client.gui.GuiScreen

class GuiKeybindHelper(private val prevGui: GuiScreen) : GuiScreen() {
override fun initGui() {
buttonList.add(GuiButton(1, width / 2 + 40, height / 3, "ON"))
}

override fun drawScreen(mouseX: Int, mouseY: Int, partialTicks: Float) {
Fonts.font40.drawString("Enable", width / 2 - 100, (height / 3 - mc.fontRendererObj.FONT_HEIGHT * 2).toFloat(), 0xffffff, false)
}
}

0 comments on commit cbebe40

Please sign in to comment.