Skip to content

[v3] fix: AuthMe login race, LocalMode port override, and incomplete deop in stand-reset - #56

Merged
Drownek merged 3 commits into
Drownek:v3-devfrom
monikon22:fix/54-stand-bugs
Aug 27, 2026
Merged

[v3] fix: AuthMe login race, LocalMode port override, and incomplete deop in stand-reset#56
Drownek merged 3 commits into
Drownek:v3-devfrom
monikon22:fix/54-stand-bugs

Conversation

@monikon22

Copy link
Copy Markdown
Contributor

Three independent bugs @Drownek found testing #52 on a real stand. Small enough to land as their own PR rather than wait on the player-reuse rework.

AuthMe login prompt missed during handshake

auth-authme-package/index.ts read player.getMessageBufferIndex() to mark where in the chat buffer to start scanning for the login/register prompt. But the prompt can arrive during the handshake, before that read happens — so the poll below started scanning from a point already past the prompt and hung waiting for something it had already missed.

Fixed by hardcoding joinIndex = 0. This buffer is fresh per player, so scanning from the start doesn't risk picking up a stale prompt from a previous connection.

LocalMode ignores the configured port

LocalEnvironmentSpec.port was already wired into the runner config, so bots connected to whatever port the environment DSL specified. But PaperProvisionTask never wrote that port into server.properties — the server itself always came up on Paper's default, 25565, no matter what the config said. Anyone setting a custom port got a bot pointed at a port nothing was listening on.

Added a port input to PaperProvisionTask, wired from spec.port in LocalMode.registerTasks, and now written as server-port= alongside the existing online-mode/connection-throttle/spawn-protection patching.

stand-reset.ts deop doesn't clear ability state

The reset plugin ran the raw minecraft:deop command, which strips operator status server-side but leaves nothing telling the bot's own tracked state that it happened. player.abilities kept reporting op for an account the server no longer trusted.

Swapped in player.deOp(), which sends the same command and clears the local op mark to match.

Testing

  • :plugwright-local:compileKotlin — passes
  • tsc --noEmit on auth-authme-package — clean

Closes #54

Login prompt can arrive during handshake, before player.getMessageBufferIndex()
is read. Reading it too late means the poll below scans from after the prompt
and never finds it.

Fixes part of Drownek#54
spec.port was already threaded into the runner config so bots connect to it,
but PaperProvisionTask never wrote it into server.properties, so the locally
provisioned server always came up on the Paper default (25565) regardless.

Fixes part of Drownek#54
Raw 'minecraft:deop' command removed op server-side but left player.abilities
still marking 'op', so later assertions against tracked state stayed wrong
even though the server had already deopped the player.

Fixes part of Drownek#54
@Drownek
Drownek merged commit 8c0f793 into Drownek:v3-dev Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants