Skip to content

Commit d789087

Browse files
committed
update fields to match protos
1 parent 63639bf commit d789087

5 files changed

Lines changed: 26 additions & 26 deletions

File tree

api/src/main/java/com/lunarclient/apollo/module/stopwatch/Stopwatch.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ public final class Stopwatch {
8686
boolean hideWhenStopped;
8787

8888
/**
89-
* Returns the stopwatch {@link String} custom format.
89+
* Returns the stopwatch {@link String} display format.
9090
*
9191
* <p>A format string (e.g. {@code "mm:ss"}), or {@code null}
9292
* for the default display format.</p>
9393
*
94-
* @return the custom format string
94+
* @return the display format string
9595
* @since 1.2.6
9696
*/
97-
@Nullable String customFormat;
97+
@Nullable String displayFormat;
9898

9999
/**
100100
* Returns the stopwatch {@link Color} text color.

api/src/main/java/com/lunarclient/apollo/module/stopwatch/Timer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ public final class Timer {
9696
boolean hideWhenStopped;
9797

9898
/**
99-
* Returns the timer {@link String} custom format.
99+
* Returns the timer {@link String} display format.
100100
*
101101
* <p>A format string (e.g. {@code "mm:ss"}), or {@code null}
102102
* for the default display format.</p>
103103
*
104-
* @return the custom format string
104+
* @return the display format string
105105
* @since 1.2.6
106106
*/
107-
@Nullable String customFormat;
107+
@Nullable String displayFormat;
108108

109109
/**
110110
* Returns the timer {@link Component} title text.
@@ -125,7 +125,7 @@ public final class Timer {
125125
* @return whether an in-game notification is shown
126126
* @since 1.2.6
127127
*/
128-
boolean ingameNotification;
128+
boolean inGameNotification;
129129

130130
/**
131131
* Returns the timer {@link Color} text color.

common/src/main/java/com/lunarclient/apollo/module/stopwatch/StopwatchModuleImpl.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ public void addStopwatch(@NonNull Recipients recipients, @NonNull Stopwatch stop
7878
.setPreventModification(stopwatch.isPreventModification())
7979
.setHideWhenStopped(stopwatch.isHideWhenStopped());
8080

81-
String customFormat = stopwatch.getCustomFormat();
82-
if (customFormat != null) {
83-
builder.setDisplayFormat(customFormat);
81+
String displayFormat = stopwatch.getDisplayFormat();
82+
if (displayFormat != null) {
83+
builder.setDisplayFormat(displayFormat);
8484
}
8585

8686
Color textColor = stopwatch.getTextColor();
@@ -148,11 +148,11 @@ public void addTimer(@NonNull Recipients recipients, @NonNull Timer timer) {
148148
.setLoop(timer.isLoop())
149149
.setPreventModification(timer.isPreventModification())
150150
.setHideWhenStopped(timer.isHideWhenStopped())
151-
.setInGameNotification(timer.isIngameNotification());
151+
.setInGameNotification(timer.isInGameNotification());
152152

153-
String customFormat = timer.getCustomFormat();
154-
if (customFormat != null) {
155-
builder.setDisplayFormat(customFormat);
153+
String displayFormat = timer.getDisplayFormat();
154+
if (displayFormat != null) {
155+
builder.setDisplayFormat(displayFormat);
156156
}
157157

158158
Component titleText = timer.getTitleText();

docs/developers/modules/stopwatch.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void addStopwatchExample(Player viewer) {
4848
.resetOnStart(true)
4949
.preventModification(true)
5050
.hideWhenStopped(false)
51-
.customFormat("mm:ss")
51+
.displayFormat("mm:ss")
5252
.textColor(ApolloColors.DARK_AQUA)
5353
.hudPosition(HudPosition.builder()
5454
.x(-30)
@@ -119,9 +119,9 @@ public void addTimerExample(Player viewer) {
119119
.loop(false)
120120
.preventModification(true)
121121
.hideWhenStopped(false)
122-
.customFormat("mm:ss")
122+
.displayFormat("mm:ss")
123123
.titleText(Component.text("Time's up!", NamedTextColor.RED))
124-
.ingameNotification(true)
124+
.inGameNotification(true)
125125
.textColor(ApolloColors.LIGHT_PURPLE)
126126
.hudPosition(HudPosition.builder()
127127
.x(-10)
@@ -210,10 +210,10 @@ public void resetTimersExample(Player viewer) {
210210
.hideWhenStopped(false)
211211
```
212212

213-
`.customFormat(String)` is a format string (e.g. `"mm:ss"`). Uses the default display format if not provided.
213+
`.displayFormat(String)` is a format string (e.g. `"mm:ss"`). Uses the default display format if not provided.
214214

215215
```java
216-
.customFormat("mm:ss")
216+
.displayFormat("mm:ss")
217217
```
218218

219219
`.textColor(java.awt.Color)` is the text color. Defaults to white if not provided. See the [colors page](/apollo/developers/utilities/colors) for more.
@@ -266,10 +266,10 @@ public void resetTimersExample(Player viewer) {
266266
.hideWhenStopped(false)
267267
```
268268

269-
`.customFormat(String)` is a format string. Uses the default display format if not provided.
269+
`.displayFormat(String)` is a format string. Uses the default display format if not provided.
270270

271271
```java
272-
.customFormat("mm:ss")
272+
.displayFormat("mm:ss")
273273
```
274274

275275
`.titleText(Component)` is the on-screen title shown when the timer finishes. Set to `null` or omit to skip. See the [chat components](https://docs.advntr.dev/text.html) page for more.
@@ -278,10 +278,10 @@ public void resetTimersExample(Player viewer) {
278278
.titleText(Component.text("Time's up!", NamedTextColor.RED))
279279
```
280280

281-
`.ingameNotification(boolean)` determines whether to show an in-game popup when the timer finishes.
281+
`.inGameNotification(boolean)` determines whether to show an in-game popup when the timer finishes.
282282

283283
```java
284-
.ingameNotification(true)
284+
.inGameNotification(true)
285285
```
286286

287287
`.textColor(java.awt.Color)` is the text color. Defaults to white if not provided. See the [colors page](/apollo/developers/utilities/colors) for more.

example/bukkit/api/src/main/java/com/lunarclient/apollo/example/api/module/StopwatchApiExample.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void addStopwatchExample(Player viewer) {
5252
.resetOnStart(true)
5353
.preventModification(true)
5454
.hideWhenStopped(false)
55-
.customFormat("mm:ss")
55+
.displayFormat("mm:ss")
5656
.textColor(ApolloColors.DARK_AQUA)
5757
.hudPosition(HudPosition.builder()
5858
.x(-30)
@@ -105,9 +105,9 @@ public void addTimerExample(Player viewer) {
105105
.loop(false)
106106
.preventModification(true)
107107
.hideWhenStopped(false)
108-
.customFormat("mm:ss")
108+
.displayFormat("mm:ss")
109109
.titleText(Component.text("Time's up!", NamedTextColor.RED))
110-
.ingameNotification(true)
110+
.inGameNotification(true)
111111
.textColor(ApolloColors.LIGHT_PURPLE)
112112
.hudPosition(HudPosition.builder()
113113
.x(-10)

0 commit comments

Comments
 (0)