mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
Fix verbose command usages not being disabled properly (#4530)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
This commit is contained in:
parent
f0da17b75c
commit
7d7a8e47ac
@ -771,14 +771,15 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
||||
} catch (final NoChargeException | QuietAbortException ex) {
|
||||
return true;
|
||||
} catch (final NotEnoughArgumentsException ex) {
|
||||
sender.sendMessage(tl("commandHelpLine1", commandLabel));
|
||||
sender.sendMessage(tl("commandHelpLine2", command.getDescription()));
|
||||
sender.sendMessage(tl("commandHelpLine3"));
|
||||
if (getSettings().isVerboseCommandUsages() && !cmd.getUsageStrings().isEmpty()) {
|
||||
sender.sendMessage(tl("commandHelpLine1", commandLabel));
|
||||
sender.sendMessage(tl("commandHelpLine2", command.getDescription()));
|
||||
sender.sendMessage(tl("commandHelpLine3"));
|
||||
for (Map.Entry<String, String> usage : cmd.getUsageStrings().entrySet()) {
|
||||
sender.sendMessage(tl("commandHelpLineUsage", usage.getKey().replace("<command>", commandLabel), usage.getValue()));
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage(command.getDescription());
|
||||
sender.sendMessage(command.getUsage().replace("<command>", commandLabel));
|
||||
}
|
||||
if (!ex.getMessage().isEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user