Skip to content

Conversation

@pop4959
Copy link
Member

@pop4959 pop4959 commented Mar 5, 2020

Fixes #3000.

So, the tab completions for the exp command were really wacky in how they worked. Not sure if it was a bug or just poorly designed. I changed it up a bit so that it is slightly more sane, although I didn't rewrite it from the ground up.

Notable changes:

  • It correctly suggests completing either player or level now as appropriate.
  • When completing level, it will not infinitely ask you to add "l" to the end, and will stop tab completing if you added an "l".
  • Tab completing levels now correctly works with the "take" sub command.
  • Removed the unnecessary check for "show" when completing for players, because literally every command can take a player as the second argument.
  • Many unnecessary branches were removed, which slightly cleaned up the code.

I tested the following tab completions and they all worked after the changes:

/xp <TAB>
/xp give <TAB>
/xp give 1<TAB>
/xp give <player> 1<TAB>
/xp reset <TAB>
/xp set <TAB>
/xp set 1<TAB>
/xp set <player> 1<TAB>
/xp show <TAB>
/xp take <TAB>
/xp take 1<TAB>
/xp take <player> 1<TAB>

@pop4959 pop4959 added the bug: confirmed Confirmed bugs in EssentialsX. label Mar 5, 2020
@Ichbinjoe Ichbinjoe merged commit c7d9ce7 into EssentialsX:2.x Mar 31, 2020
@mdcfe mdcfe added this to the 2.18.0 milestone Apr 6, 2020
ressidell pushed a commit to ressidell/Essentials that referenced this pull request Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: confirmed Confirmed bugs in EssentialsX.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XP Command Tab Complete

5 participants