Skip to content
Merged
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 @@ -770,12 +770,12 @@ public boolean onCommandEssentials(final CommandSender cSender, final Command co
sender.sendMessage(tl("commandHelpLine1", commandLabel));
sender.sendMessage(tl("commandHelpLine2", command.getDescription()));
sender.sendMessage(tl("commandHelpLine3"));
if (!cmd.getUsageStrings().isEmpty()) {
if (getSettings().isVerboseCommandUsages() && !cmd.getUsageStrings().isEmpty()) {
for (Map.Entry<String, String> usage : cmd.getUsageStrings().entrySet()) {
sender.sendMessage(tl("commandHelpLineUsage", usage.getKey().replace("<command>", commandLabel), usage.getValue()));
}
} else {
sender.sendMessage(command.getUsage());
sender.sendMessage(command.getUsage().replace("<command>", commandLabel));
}
if (!ex.getMessage().isEmpty()) {
sender.sendMessage(ex.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ public interface ISettings extends IConf {

Set<String> getDisabledCommands();

boolean isVerboseCommandUsages();

boolean isCommandOverridden(String name);

boolean isDebug();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ public Set<String> getDisabledCommands() {
return disabledCommands;
}

@Override
public boolean isVerboseCommandUsages() {
return config.getBoolean("verbose-command-usages", true);
}

private void _addAlternativeCommand(final String label, final Command current) {
Command cmd = ess.getAlternativeCommandsHandler().getAlternative(label);
if (cmd == null) {
Expand Down
4 changes: 4 additions & 0 deletions Essentials/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ disabled-commands:
# - nick
# - clear

# Whether or not Essentials should show detailed command usages.
# If set to false, Essentials will collapse all usages in to one single usage message.
verbose-command-usages: true

# These commands will be shown to players with socialSpy enabled.
# You can add commands from other plugins you may want to track or
# remove commands that are used for something you dont want to spy on.
Expand Down