Skip to content

Commit 48c8bb9

Browse files
chore: add comments to all fields
1 parent 3b8ff8f commit 48c8bb9

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

shared/src/main/java/net/pistonmaster/pistonmotd/shared/config/PistonMOTDBaseServerConfig.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public abstract class PistonMOTDBaseServerConfig {
2828
@Comment({"", "Not supported on: Spigot (Paper works), Sponge"})
2929
private Version version = new Version();
3030

31+
@Comment({"", "Player count and hover sample settings."})
3132
private Players players = new Players();
3233

3334
@Comment({"", "The image of a server in the server list."})
@@ -39,7 +40,10 @@ public abstract class PistonMOTDBaseServerConfig {
3940
@Getter
4041
@Configuration
4142
public static class Description {
43+
@Comment("Enables the custom MOTD.")
4244
private boolean activated = true;
45+
46+
@Comment("The MOTD lines shown in the server list.")
4347
private List<String> text = List.of(
4448
"Hello! <newline>World!",
4549
"Use &c<underlined>color <bold><yellow>codes!",
@@ -68,14 +72,20 @@ public static class Version {
6872
@Getter
6973
@Configuration
7074
public static class Name {
75+
@Comment("Enables the custom version name.")
7176
private boolean activated = true;
77+
78+
@Comment("The version name shown to incompatible clients.")
7279
private String text = "&1My custom version name!";
7380
}
7481

7582
@Getter
7683
@Configuration
7784
public static class Protocol {
85+
@Comment("Enables the custom protocol number.")
7886
private boolean activated = false;
87+
88+
@Comment("The protocol number sent to the client.")
7989
private int value = 1;
8090
}
8191
}
@@ -98,14 +108,20 @@ public static class Players {
98108
@Getter
99109
@Configuration
100110
public static class Online {
111+
@Comment("Enables the custom online player count.")
101112
private boolean activated = false;
113+
114+
@Comment("The online player count shown in the server list.")
102115
private int value = 0;
103116
}
104117

105118
@Getter
106119
@Configuration
107120
public static class Max {
121+
@Comment("Enables the custom max player count.")
108122
private boolean activated = false;
123+
124+
@Comment("The max player count shown in the server list.")
109125
private int value = 10;
110126
}
111127

@@ -119,7 +135,10 @@ public static class Sample {
119135
})
120136
private Vanilla vanilla = new Vanilla();
121137

138+
@Comment("Enables the custom hover sample below.")
122139
private boolean activated = true;
140+
141+
@Comment("The lines shown in the hover sample when vanilla mode is disabled.")
123142
private List<String> text = List.of(
124143
"&3Hello world!",
125144
"&eNewline!",
@@ -131,7 +150,10 @@ public static class Sample {
131150
@Getter
132151
@Configuration
133152
public static class Vanilla {
153+
@Comment("Uses the real player list instead of the custom hover sample.")
134154
private boolean activated = false;
155+
156+
@Comment("Players hidden from the vanilla player sample.")
135157
private List<String> hidden = List.of("Notch");
136158
}
137159
}
@@ -140,6 +162,7 @@ public static class Vanilla {
140162
@Getter
141163
@Configuration
142164
public static class Favicon {
165+
@Comment("Enables the custom server favicon.")
143166
private boolean activated = false;
144167

145168
@Comment({
@@ -192,6 +215,7 @@ public static class Advanced {
192215
@Getter
193216
@Configuration
194217
public static class SupportedProtocol {
218+
@Comment("Enables protocol-based version filtering.")
195219
private boolean activated = false;
196220

197221
@Comment("Shown when the protocol is not supported.")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
package net.pistonmaster.pistonmotd.shared.config;
22

3+
import de.exlll.configlib.Comment;
34
import de.exlll.configlib.Configuration;
45
import lombok.Getter;
56

67
@Getter
78
@Configuration
89
public class PistonMOTDDomainConfig extends PistonMOTDBaseServerConfig {
10+
@Comment("Matches requests whose host ends with this domain.")
911
private String domain = "";
1012

13+
@Comment({"", "Advanced features and protocol-specific behavior for this domain."})
1114
private Advanced advanced = new Advanced();
1215
}

shared/src/main/java/net/pistonmaster/pistonmotd/shared/config/PistonMOTDPluginConfig.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class PistonMOTDPluginConfig extends PistonMOTDBaseServerConfig {
1212
@Comment({"", "Check for updates on startup. (Only works on Sponge)"})
1313
private boolean updateChecking = true;
1414

15+
@Comment({"", "Advanced features and protocol-specific behavior."})
1516
private PluginAdvanced advanced = new PluginAdvanced();
1617

1718
@Getter
@@ -29,7 +30,10 @@ public static class PluginAdvanced extends Advanced {
2930
@Getter
3031
@Configuration
3132
public static class PerDomainStatus {
33+
@Comment("Enables per-domain status overrides.")
3234
private boolean activated = false;
35+
36+
@Comment("The per-domain overrides keyed by an arbitrary entry name.")
3337
private Map<String, PistonMOTDDomainConfig> domains = Map.of(
3438
"example", createExampleDomain1(),
3539
"example2", createExampleDomain2()

0 commit comments

Comments
 (0)