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,13 +147,17 @@ 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 String subCmd = args[0].toLowerCase(Locale.ENGLISH);
final boolean isModifyCmd = (subCmd.equals("set") && user.isAuthorized("essentials.exp.set")) || (subCmd.equals("give") && user.isAuthorized("essentials.exp.give")) || (subCmd.equals("take") && user.isAuthorized("essentials.exp.take"));
final boolean hasOthers = (subCmd.equals("set") && user.isAuthorized("essentials.exp.set.others")) || (subCmd.equals("give") && user.isAuthorized("essentials.exp.give.others")) || (subCmd.equals("take") && user.isAuthorized("essentials.exp.take.others")) || (subCmd.equals("show") && user.isAuthorized("essentials.exp.others")) || (subCmd.equals("reset") && user.isAuthorized("essentials.exp.reset.others"));
if (isModifyCmd && !hasOthers) {
final String levellessArg = args[1].toLowerCase(Locale.ENGLISH).replaceAll("l", "");
if (NumberUtil.isInt(levellessArg)) {
return Lists.newArrayList(levellessArg + "l");
}
return Collections.emptyList();
}
if (user.isAuthorized("essentials.exp.others")) {
if (hasOthers) {
return getPlayers(user);
}
} else if (args.length == 3 && !(args[0].equalsIgnoreCase("show") || args[0].equalsIgnoreCase("reset"))) {
Expand Down
2 changes: 1 addition & 1 deletion Essentials/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ 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
expCommandUsage3Description=Displays the amount of xp the target player has
expCommandUsage5=/<command> reset <playername>
expCommandUsage5Description=Resets the target player's xp to 0
Comment on lines 379 to 380

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename these to Usage4

expSet=<secondary>{0} <primary>now has<secondary> {1} <primary>exp.
Expand Down
2 changes: 1 addition & 1 deletion Essentials/src/main/resources/messages_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ expCommandUsage1Description=Выдаёт указанному игроку за
expCommandUsage2=/<command> set <игрок> <кол-во>
expCommandUsage2Description=Устанавливает опыт игрока на указанное количество
expCommandUsage3=/<command> show <игрок>
expCommandUsage4Description=Отображает количество опыта указанного игрока
expCommandUsage3Description=Отображает количество опыта указанного игрока

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes to other locales won't be saved, when this PR is merged it will need to be updated on Crowdin.

expCommandUsage5=/<command> reset <игрок>
expCommandUsage5Description=Сбрасывает опыт указанного игрока
expSet=<secondary>{0} <primary>теперь имеет<secondary> {1} <primary>опыта.
Expand Down
Loading