mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
Prevent sending usage info when executing alternative commands (#3904)
This commit is contained in:
parent
026d279556
commit
eae8bc05c9
@ -92,7 +92,7 @@ public class AlternativeCommandsHandler {
|
||||
|
||||
public void executed(final String label, final Command pc) {
|
||||
if (pc instanceof PluginIdentifiableCommand) {
|
||||
final String altString = ((PluginIdentifiableCommand) pc).getPlugin().getName() + ":" + pc.getLabel();
|
||||
final String altString = ((PluginIdentifiableCommand) pc).getPlugin().getName() + ":" + pc.getName();
|
||||
if (ess.getSettings().isDebug()) {
|
||||
LOGGER.log(Level.INFO, "Essentials: Alternative command " + label + " found, using " + altString);
|
||||
}
|
||||
|
@ -581,12 +581,12 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
||||
if (pc != null) {
|
||||
alternativeCommandsHandler.executed(commandLabel, pc);
|
||||
try {
|
||||
return pc.execute(cSender, commandLabel, args);
|
||||
pc.execute(cSender, commandLabel, args);
|
||||
} catch (final Exception ex) {
|
||||
Bukkit.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
|
||||
cSender.sendMessage(tl("internalError"));
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user