Skip to content

Commit 592123d

Browse files
committed
Update DiscordRPC.java
1 parent 8bfbfb8 commit 592123d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/me/redcarlos/higtools/modules/main/DiscordRPC.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public DiscordRPC() {
115115
runInMainMenu = true;
116116
}
117117

118+
/** Registers a custom state to be used when the current screen is a class in the specified package. */
118119
public static void registerCustomState(String packageName, String state) {
119120
for (var pair : customStates) {
120121
if (pair.getLeft().equals(packageName)) {
@@ -126,6 +127,7 @@ public static void registerCustomState(String packageName, String state) {
126127
customStates.add(new Pair<>(packageName, state));
127128
}
128129

130+
/** The package name must match exactly to the one provided through {@link #registerCustomState(String, String)}. */
129131
public static void unregisterCustomState(String packageName) {
130132
customStates.removeIf(pair -> pair.getLeft().equals(packageName));
131133
}
@@ -138,7 +140,7 @@ public void onActivate() {
138140

139141
rpc.setStart(System.currentTimeMillis() / 1000L);
140142

141-
String largeText = "HIGTools " + HIGTools.VERSION;
143+
String largeText = "%s".formatted(HIGTools.VERSION);
142144
rpc.setLargeImage("higtools", largeText);
143145

144146
recompileLine1();

0 commit comments

Comments
 (0)