-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathStopwatch.java
More file actions
119 lines (108 loc) · 3.38 KB
/
Copy pathStopwatch.java
File metadata and controls
119 lines (108 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
* This file is part of Apollo, licensed under the MIT License.
*
* Copyright (c) 2026 Moonsworth
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.lunarclient.apollo.module.stopwatch;
import com.lunarclient.apollo.common.location.HudPosition;
import java.awt.Color;
import lombok.Builder;
import lombok.Getter;
import org.jetbrains.annotations.Nullable;
/**
* Represents a stopwatch which can be displayed on the client HUD.
*
* @since 1.2.6
*/
@Getter
@Builder
public final class Stopwatch {
/**
* Returns the stopwatch {@link String} id.
*
* @return the stopwatch id
* @since 1.2.6
*/
String id;
/**
* Returns the stopwatch {@link String} name.
*
* @return the stopwatch name
* @since 1.2.6
*/
String name;
/**
* Returns the stopwatch {@code boolean} reset on start.
*
* <p>If {@code true}, elapsed time is reset on each start.</p>
*
* @return whether to reset on start
* @since 1.2.6
*/
boolean resetOnStart;
/**
* Returns the stopwatch {@code boolean} prevent modification.
*
* <p>If {@code true}, the user cannot modify the options for this
* stopwatch on the client side.</p>
*
* @return whether modification is prevented
* @since 1.2.6
*/
boolean preventModification;
/**
* Returns the stopwatch {@code boolean} hide when stopped.
*
* <p>If {@code true}, the stopwatch is hidden from the HUD when stopped.</p>
*
* @return whether to hide when stopped
* @since 1.2.6
*/
boolean hideWhenStopped;
/**
* Returns the stopwatch {@link String} display format.
*
* <p>A format string (e.g. {@code "mm:ss"}), or {@code null}
* for the default display format.</p>
*
* @return the display format string
* @since 1.2.6
*/
@Nullable String displayFormat;
/**
* Returns the stopwatch {@link Color} text color.
*
* <p>If {@code null}, the default color (white) is used.</p>
*
* @return the text color
* @since 1.2.6
*/
@Nullable Color textColor;
/**
* Returns the stopwatch {@link HudPosition} HUD position.
*
* <p>If {@code null}, the stopwatch is auto-stacked at the default position.</p>
*
* @return the HUD position
* @since 1.2.6
*/
@Nullable HudPosition hudPosition;
}