Skip to content

Commit

Permalink
feat: added logging and fixed release
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHillcox committed Dec 17, 2023
1 parent 008b2ff commit 75b8f71
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## 3.0.6

### Added

- Config option to enable state logging of the JSON data we send to Discord

### Fixed

- KubeJS fields being private on new events
3 changes: 3 additions & 0 deletions common/src/main/java/com/sunekaer/sdrp/config/SDRPConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public class SDRPConfig implements ConfigData {
@Comment("If set to false, it disables the build in clientJoinEvent, which is used to tell when the player is join a world and changing Dimension.")
public boolean clientJoinEvent = true;

@Comment("When enabled, the mod will log the current state being sent to Discord")
public boolean logState = false;

@Override
public void validatePostLoad() {
var oldConfig = SDRPCrossPlatform.getConfigDirectory().resolve("sdrp.json");
Expand Down
3 changes: 3 additions & 0 deletions common/src/main/java/com/sunekaer/sdrp/discord/RPClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ private void processStateQueue() {
}

this.client.sendRichPresence(state);
if (SDRP.config.logState) {
LOGGER.info("Sent state to discord: {}", state.toJson().toString());
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 75b8f71

Please sign in to comment.