Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,21 @@ protected List<String> getTabCompleteOptions(final Server server, final User use
}
return options;
} else if (args.length == 2) {
if ((args[0].equalsIgnoreCase("set") && user.isAuthorized("essentials.exp.set")) || (args[0].equalsIgnoreCase("give") && user.isAuthorized("essentials.exp.give")) || (args[0].equalsIgnoreCase("take") && user.isAuthorized("essentials.exp.take"))) {
final ExpCommands cmd;
try {
cmd = ExpCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH));
} catch (final IllegalArgumentException e) {
return Collections.emptyList();
}
if (cmd.hasOtherPermission(user)) {
return getPlayers(user);
}
if (cmd.hasPermission(user) && cmd != ExpCommands.SHOW && cmd != ExpCommands.RESET) {
final String levellessArg = args[1].toLowerCase(Locale.ENGLISH).replaceAll("l", "");
if (NumberUtil.isInt(levellessArg)) {
return Lists.newArrayList(levellessArg + "l");
}
}
if (user.isAuthorized("essentials.exp.others")) {
return getPlayers(user);
}
} else if (args.length == 3 && !(args[0].equalsIgnoreCase("show") || args[0].equalsIgnoreCase("reset"))) {
final String levellessArg = args[2].toLowerCase(Locale.ENGLISH).replaceAll("l", "");
if (NumberUtil.isInt(levellessArg)) {
Expand Down
6 changes: 3 additions & 3 deletions Essentials/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,9 @@ expCommandUsage1Description=Gives the target player the specified amount of xp
expCommandUsage2=/<command> set <playername> <amount>
expCommandUsage2Description=Sets the target player's xp the specified amount
expCommandUsage3=/<command> show <playername>
expCommandUsage4Description=Displays the amount of xp the target player has
expCommandUsage5=/<command> reset <playername>
expCommandUsage5Description=Resets the target player's xp to 0
expCommandUsage3Description=Displays the amount of xp the target player has
expCommandUsage4=/<command> reset <playername>
expCommandUsage4Description=Resets the target player's xp to 0
expSet=<secondary>{0} <primary>now has<secondary> {1} <primary>exp.
extCommandDescription=Extinguish players.
extCommandUsage=/<command> [player]
Expand Down
Loading