Skip to content

Fix Paper dialog timeouts and email argument parsing - #3204

Open
Minecraft0122 wants to merge 1 commit into
AuthMe:masterfrom
Minecraft0122:master
Open

Minecraft0122 wants to merge 1 commit into
AuthMe:masterfrom
Minecraft0122:master

Conversation

@Minecraft0122

@Minecraft0122 Minecraft0122 commented Nov 22, 2026 •

Copy link
Copy Markdown

Fixes #3146 by disconnecting players during the Paper configuration phase when the login or registration dialog fails or times out. The dialog closes before disconnect, preventing clients from remaining on a waiting screen.

Also registers /email add with a native greedy string argument so Minecraft clients accept addresses containing @ without displaying a command syntax error. Existing command handling and validation remain unchanged.

Closes #3157
Closes #3067

Close Paper authentication dialogs by disconnecting during configuration when login or registration fails. Register /email add arguments with a native greedy string so addresses containing @ are accepted by the client parser.
@Minecraft0122
Minecraft0122 marked this pull request as ready for review November 22, 2026 13:45
@Minecraft0122

Copy link
Copy Markdown
Author

#3067 and #3157 are also part of the fixes

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Cancellation kicks can preempt valid proxy auto-login, while regression tests do not verify the native greedy argument type or close-before-disconnect ordering for both login and registration timeouts.

3 open issues
What changed in this PR

This PR updates AuthMe’s Paper integration to disconnect players during configuration when authentication dialogs fail or time out, and fixes client-side parsing of email addresses.

Changes:

  • Close login and registration dialogs before disconnecting, rather than deferring kicks until join.
  • Register /email add with a native greedy-string argument while preserving existing command handling.
  • Add email parsing coverage and update the login-timeout assertion.
File Description
authme-paper-common/​src/​test/​java/​fr/​xephi/​authme/​platform/​PaperBrigadierCommandRegistrarTest.java Adds an email command fixture and parsing test.
authme-paper-common/​src/​test/​java/​fr/​xephi/​authme/​listener/​PaperDialogFlowListenerTest.java Checks configuration-phase disconnection on login timeout.
authme-paper-common/​src/​main/​java/​fr/​xephi/​authme/​platform/​PaperBrigadierCommandRegistrar.java Uses a native greedy-string argument for email addition.
authme-paper-common/​src/​main/​java/​fr/​xephi/​authme/​listener/​PaperDialogFlowListener.java Closes dialogs before disconnecting with the failure message.

Review effort: Balanced

Comment on lines 269 to +270
if (kickMessage != null) {
preJoinDialogService.storePendingKickMessage(sessionId, kickMessage);
connection.disconnect(LegacyComponentSerializer.legacySection().deserialize(kickMessage));
Comment on lines +727 to 729
verify(connection).disconnect(any(net.kyori.adventure.text.Component.class));
verify(preJoinDialogService, never()).storePendingKickMessage(anyLong(), anyString());
}
@Test
public void shouldAcceptAtSignInEmailAddArguments() throws Exception {
String input = "email add test@example.org test@example.org";
assertThat(dispatcher.parse(input, sourceStack).getExceptions().isEmpty(), equalTo(true));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Command completion /email add is broken A lot of times, AuthMe won't automatically close the custom interface Can't add email

2 participants