@@ -159,31 +159,68 @@ private Builder() {
159
159
160
160
}
161
161
162
+ /**
163
+ * Uses the modified {@code version} info in the response.
164
+ *
165
+ * @param version version info to set
166
+ * @return this builder, for chaining
167
+ */
162
168
public Builder version (Version version ) {
163
169
this .version = Preconditions .checkNotNull (version , "version" );
164
170
return this ;
165
171
}
166
172
173
+ /**
174
+ * Uses the modified {@code onlinePlayers} number in the response.
175
+ *
176
+ * @param onlinePlayers number for online players to set
177
+ * @return this builder, for chaining
178
+ */
167
179
public Builder onlinePlayers (int onlinePlayers ) {
168
180
this .onlinePlayers = onlinePlayers ;
169
181
return this ;
170
182
}
171
183
184
+ /**
185
+ * Uses the modified {@code maximumPlayers} number in the response.
186
+ * <b>This will not modify the actual maximum players that can join the server.</b>
187
+ *
188
+ * @param maximumPlayers number for maximum players to set
189
+ * @return this builder, for chaining
190
+ */
172
191
public Builder maximumPlayers (int maximumPlayers ) {
173
192
this .maximumPlayers = maximumPlayers ;
174
193
return this ;
175
194
}
176
195
196
+ /**
197
+ * Uses the modified {@code players} array in the response.
198
+ *
199
+ * @param players array of SamplePlayers to set
200
+ * @return this builder, for chaining
201
+ */
177
202
public Builder samplePlayers (SamplePlayer ... players ) {
178
203
this .samplePlayers .addAll (Arrays .asList (players ));
179
204
return this ;
180
205
}
181
206
207
+ /**
208
+ * Uses the modified {@code modType} in the response.
209
+ *
210
+ * @param modType the mod type to set
211
+ * @return this builder, for chaining
212
+ */
182
213
public Builder modType (String modType ) {
183
214
this .modType = Preconditions .checkNotNull (modType , "modType" );
184
215
return this ;
185
216
}
186
217
218
+ /**
219
+ * Uses the modified {@code mods} array in the response.
220
+ *
221
+ * @param mods array of mods to use
222
+ * @return this builder, for chaining
223
+ */
187
224
public Builder mods (ModInfo .Mod ... mods ) {
188
225
this .mods .addAll (Arrays .asList (mods ));
189
226
return this ;
@@ -193,7 +230,7 @@ public Builder mods(ModInfo.Mod... mods) {
193
230
* Uses the modified {@code mods} list in the response.
194
231
*
195
232
* @param mods the mods list to use
196
- * @return this build , for chaining
233
+ * @return this builder , for chaining
197
234
*/
198
235
public Builder mods (ModInfo mods ) {
199
236
Preconditions .checkNotNull (mods , "mods" );
@@ -203,36 +240,74 @@ public Builder mods(ModInfo mods) {
203
240
return this ;
204
241
}
205
242
243
+ /**
244
+ * Clears the current list of mods to use in the response.
245
+ *
246
+ * @return this builder, for chaining
247
+ */
206
248
public Builder clearMods () {
207
249
this .mods .clear ();
208
250
return this ;
209
251
}
210
252
253
+ /**
254
+ * Clears the current list of PlayerSamples to use in the response.
255
+ *
256
+ * @return this builder, for chaining
257
+ */
211
258
public Builder clearSamplePlayers () {
212
259
this .samplePlayers .clear ();
213
260
return this ;
214
261
}
215
262
263
+ /**
264
+ * Defines the server as mod incompatible in the response.
265
+ *
266
+ * @return this builder, for chaining
267
+ */
216
268
public Builder notModCompatible () {
217
269
this .nullOutModinfo = true ;
218
270
return this ;
219
271
}
220
272
273
+ /**
274
+ * Enables nulling Players in the response.
275
+ * This will display the player count as {@code ???}.
276
+ *
277
+ * @return this builder, for chaining
278
+ */
221
279
public Builder nullPlayers () {
222
280
this .nullOutPlayers = true ;
223
281
return this ;
224
282
}
225
283
284
+ /**
285
+ * Uses the {@code description} Component in the response.
286
+ *
287
+ * @param description Component to use as the description.
288
+ * @return this builder, for chaining
289
+ */
226
290
public Builder description (net .kyori .adventure .text .Component description ) {
227
291
this .description = Preconditions .checkNotNull (description , "description" );
228
292
return this ;
229
293
}
230
294
295
+ /**
296
+ * Uses the {@code favicon} in the response.
297
+ *
298
+ * @param favicon Favicon instance to use.
299
+ * @return this builder, for chaining
300
+ */
231
301
public Builder favicon (Favicon favicon ) {
232
302
this .favicon = Preconditions .checkNotNull (favicon , "favicon" );
233
303
return this ;
234
304
}
235
305
306
+ /**
307
+ * Clears the current favicon used in the response.
308
+ *
309
+ * @return this builder, for chaining
310
+ */
236
311
public Builder clearFavicon () {
237
312
this .favicon = null ;
238
313
return this ;
0 commit comments