Skip to content

fix: ignore case for online player command lookups#860

Open
Miroshka000 wants to merge 1 commit intoAllayMC:masterfrom
Miroshka000:fix/case-insensitive-online-player-lookup
Open

fix: ignore case for online player command lookups#860
Miroshka000 wants to merge 1 commit intoAllayMC:masterfrom
Miroshka000:fix/case-insensitive-online-player-lookup

Conversation

@Miroshka000
Copy link
Copy Markdown
Contributor

Summary

  • ignore case when resolving online player names for command lookups
  • keep exact match priority and only fall back to a unique case-insensitive online match
  • do not guess or rewrite offline names when no online player matches
  • apply the same behavior to name selectors and operator/whitelist/ban player-name checks

Testing

  • ./gradlew clean :server:test --tests "org.allaymc.server.player.PlayerNameMatcherTest" --tests "org.allaymc.server.command.selector.args.NameSelectorArgumentTest"

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 30.43478% with 48 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../org/allaymc/server/player/AllayPlayerManager.java 0.00% 18 Missing ⚠️
...a/org/allaymc/server/player/PlayerNameMatcher.java 57.14% 7 Missing and 8 partials ⚠️
...g/allaymc/server/command/defaults/DeOpCommand.java 0.00% 5 Missing ⚠️
...org/allaymc/server/command/defaults/OpCommand.java 0.00% 5 Missing ⚠️
...aymc/server/command/defaults/WhitelistCommand.java 0.00% 4 Missing ⚠️
...org/allaymc/server/command/selector/args/Name.java 50.00% 0 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ Complexity Δ
...org/allaymc/server/command/selector/args/Name.java 91.66% <50.00%> (+66.66%) 8.00 <2.00> (+5.00)
...aymc/server/command/defaults/WhitelistCommand.java 37.77% <0.00%> (ø) 2.00 <0.00> (ø)
...g/allaymc/server/command/defaults/DeOpCommand.java 23.52% <0.00%> (-3.14%) 2.00 <0.00> (ø)
...org/allaymc/server/command/defaults/OpCommand.java 23.52% <0.00%> (-3.14%) 2.00 <0.00> (ø)
...a/org/allaymc/server/player/PlayerNameMatcher.java 57.14% <57.14%> (ø) 13.00 <13.00> (?)
.../org/allaymc/server/player/AllayPlayerManager.java 15.24% <0.00%> (-1.21%) 3.00 <0.00> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Miroshka000 Miroshka000 force-pushed the fix/case-insensitive-online-player-lookup branch from 4bedfc5 to 488bd5e Compare March 28, 2026 21:41
@smartcmd smartcmd requested a review from IWareQ March 29, 2026 03:13
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.

1 participant