Repository navigation
Conversation
The client requests command suggestions on every keystroke, and the player UUID binding resolved each partial name through the platform, which on Bukkit looks unknown names up on the Mojang API. Return the actor's UUID during suggestion parsing instead, and suggest online player names plus me, * and console for UUID arguments. Fixes #3303
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟡 Changes recommended
The change still risks throwing an uncaught IllegalArgumentException during tab-completion because UUID.fromString(argument) is invoked on partial/invalid UUID input in ConsumeBindings.java (lines 175 and 196), leaving an active moderate issue that undermines the goal of avoiding pre-execution exceptions.
1 open issue
What changed in this PR
This pull request updates command argument binding behavior to avoid performing player UUID resolution (including potentially expensive/offline lookups) during tab-completion parsing, and adds a binding-level hook for providing tab-completion suggestions—targeting the //history list <player> completion crash/exception scenario.
Changes:
- Short-circuit UUID/player resolution during “suggestion parsing” to prevent pre-execution exceptions and avoid remote/offline lookups.
- Add a
Bindings#getSuggestions(...)hook so binding-registered converters can supply tab-completion candidates. - Implement UUID-argument suggestion generation (including online player names when available).
Outstanding review comments to address before approval:
- During suggestion parsing,
UUID.fromString(argument)may still throw on partial/invalid UUID input; catchIllegalArgumentExceptionand fall back safely (also noted at another location in the same file). - During suggestion parsing, always returning the executing actor’s UUID can produce incorrect downstream suggestions when a different online player name was typed; prefer resolving exact online matches first, then fall back.
This pull request requires changes.
| File | Summary |
|---|---|
worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/platform/binding/ConsumeBindings.java |
Skips UUID lookups during suggestion parsing and adds UUID argument completion suggestions. |
worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/platform/binding/Bindings.java |
Adds a generic suggestions hook and forwards converter tab-completion to binding-specific logic. |
Review effort: Balanced
| if (argument.length() > 16) { | ||
| uuid = UUID.fromString(argument); | ||
| } else { |
There was a problem hiding this comment.
I'll leave this behavior to the rest of the @IntellectualSites/fastasyncworldedit-team to decide.

Fixes #3303. Based off of the feedback received in #3306. Replacing the
UUIDargument in the commands toPlayerdidn't make much sense especially since there is no converter forPlayer. The easier solution was the one that @PierreSchwang mentioned with a few additions to it.