EssentialsX

EssentialsX

2M Downloads

Balance auto completion tweak/bug

LaughNgamez opened this issue ยท 2 comments

commented

A good config/perm would be to disable assumptions regarding commands when inputting the username.

I use PremiumVanish and it does a good job preventing essentials exploits except one.

Players can run the command:
"/balance Silas" and it will fetch me if I'm online in vanish even though my ID is Silas_Bowen.
If I'm actually offline and they run /balance Silas it will say "error player not found".

commented

I thought changing the line #33 in CommandBalance from
final User target = getPlayer(server, args, 0, true, true);
to
final User target = getPlayer(server, args, 0, false, true);
could be a solution.
However, it turns out that way, you wouldn't be able to to /balance <player> for the full name of a vanished player either.

I would therefore suggest the following changes, which seem to work for the issue at hand:
https://gist.github.com/mart-r/ba285a3afa5daf7fdbc3ecca579a8116

I'm not sure if there's any other situations where this could result in a change of behaviour, however.

commented

@mart-r Feel free to make the PR!