diff --git a/CHANGELOG.md b/CHANGELOG.md index 13cdd8c..dac6514 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ -## 86.0.0 +## 86.0.1 ### Changed -- Updated to 1.20.6 +Buttons can be added by adding the following to the mods config file. You can have up to 2 buttons. Each button can have a label up to 32 characters long. + +If you do not want to have buttons, you can leave the buttons array empty. + +```json +{ + "buttons": [ + { + "label": "Google", + "url": "https://www.google.com" + }, + { + "label": "Yahoo", + "url": "https://www.yahoo.com" + } + ] +} +``` diff --git a/README.md b/README.md index 585c9fe..693b2fb 100644 --- a/README.md +++ b/README.md @@ -111,11 +111,39 @@ We omit the `modid` from the dimension name and use the `name` instead. So `mine } ``` +### Config Buttons (6.0.2+) + +Buttons can be added by adding the following to the mods config file. + +**Restrictions** +- You can have up to 2 buttons. +- Each button can have a label up to 32 characters long. + +If you do not want to have buttons, you can leave the buttons array empty. + +```json5 +{ + "...": "See above", // See above + "buttons": [ + { + "label": "Google", + "url": "https://www.google.com" + }, + { + "label": "Yahoo", + "url": "https://www.yahoo.com" + } + ] +} +``` + ## KubeJS Integration > **Note!** > -> KubeJS Support is only support in 3.0.0+ for `1.19.2` and `4.0.3+` for `1.20.1+` +> KubeJS Support is only support in 3.0.0+ for `1.19.2` and `4.0.3+` for `1.20.1+`. +> +> KubeJS no longer supports Forge or Fabric so support for KubeJS as of `1.20.4+` is limited to just the `NeoForge` version of our mod > > Only `KubeJS 6+` is supported! diff --git a/common/src/main/java/com/sunekaer/sdrp/SDRP.java b/common/src/main/java/com/sunekaer/sdrp/SDRP.java index 2cf9738..64893b8 100644 --- a/common/src/main/java/com/sunekaer/sdrp/SDRP.java +++ b/common/src/main/java/com/sunekaer/sdrp/SDRP.java @@ -5,7 +5,6 @@ import com.sunekaer.sdrp.config.SDRPConfig; import com.sunekaer.sdrp.discord.RPClient; import com.sunekaer.sdrp.discord.State; -//import com.sunekaer.sdrp.integration.kubejs.SDRPKubeJSIntegration; import dev.architectury.event.EventResult; import dev.architectury.event.events.client.ClientGuiEvent; import dev.architectury.event.events.client.ClientLifecycleEvent; @@ -43,10 +42,6 @@ public static void init() { EntityEvent.ADD.register(SDRP::clientJoinEvent); ClientGuiEvent.INIT_POST.register(SDRP::screenEvent); - -// if (Platform.isModLoaded("kubejs")) { -// SDRPKubeJSIntegration.setup(); -// } } /** diff --git a/common/src/main/java/com/sunekaer/sdrp/config/SDRPConfig.java b/common/src/main/java/com/sunekaer/sdrp/config/SDRPConfig.java index 6dc83b7..f686f10 100644 --- a/common/src/main/java/com/sunekaer/sdrp/config/SDRPConfig.java +++ b/common/src/main/java/com/sunekaer/sdrp/config/SDRPConfig.java @@ -11,6 +11,8 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; import java.util.Optional; @Config(name = SDRP.MOD_ID + "-common") @@ -30,6 +32,9 @@ public class SDRPConfig implements ConfigData { @Comment("When enabled, the mod will log the current state being sent to Discord") public boolean logState = false; + @Comment("Set custom buttons for the Discord Rich Presences. You can only have 2 buttons, each button has a label and a URL.") + public List