Skip to content

Commit 68138bc

Browse files
committed
chore: minor dialog API JavaDocs cleanup
1 parent fd64e8a commit 68138bc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/content/docs/paper/dev/api/dialogs.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,22 +248,22 @@ public class ServerJoinListener implements Listener {
248248
return;
249249
}
250250

251-
// Construct a new completable future without a task
251+
// Construct a new completable future without a task.
252252
CompletableFuture<Boolean> response = new CompletableFuture<>();
253253

254-
// Put it into our map
254+
// Put it into our map.
255255
awaitingResponse.put(event.getConnection(), response);
256256

257-
// Show the connecting player the dialog
257+
// Show the connecting player the dialog.
258258
event.getConnection().getAudience().showDialog(dialog);
259259

260-
// Wait until the future is complete. This set is necessary to keep the player in the configuration phase
260+
// Wait until the future is complete. This step is necessary in order to keep the player in the configuration phase.
261261
if (!response.join()) {
262-
// If the response is false, they declined. Therefore, we kick them from the server
262+
// If the response is false, they declined. Therefore, we kick them from the server.
263263
event.getConnection().disconnect(Component.text("You hate Paper-chan :(", NamedTextColor.RED));
264264
}
265265

266-
// We clean the map to avoid unnecessary entry buildup
266+
// We clean the map to avoid unnecessary entry buildup.
267267
awaitingResponse.remove(event.getConnection());
268268
}
269269

@@ -275,10 +275,10 @@ public class ServerJoinListener implements Listener {
275275
Key key = event.getIdentifier();
276276

277277
if (key.equals(Key.key("papermc:paperchan/disagree"))) {
278-
// If the identifier is the same as the disagree one, set the connection result to false
278+
// If the identifier is the same as the disagree one, set the connection result to false.
279279
setConnectionJoinResult(event.getCommonConnection(), false);
280280
} else if (key.equals(Key.key("papermc:paperchan/agree"))) {
281-
// If it is the same as the agree one, set the result to true
281+
// If it is the same as the agree one, set the result to true.
282282
setConnectionJoinResult(event.getCommonConnection(), true);
283283
}
284284
}

0 commit comments

Comments
 (0)