1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-28 00:40:05 +02:00

Log target plugin in debug mode for altcmd

617959a11b
This commit is contained in:
Chris Ward
2013-01-09 20:10:22 +11:00
parent 0177eca6e0
commit 9222be9145

View File

@@ -61,7 +61,7 @@ public class EssentialsCommandHandler implements ICommandHandler, TabExecutor
if (pc != null) if (pc != null)
{ {
executed(commandLabel, pc.getLabel()); executed(commandLabel, pc);
try try
{ {
return pc.execute(sender, commandLabel, args); return pc.execute(sender, commandLabel, args);
@@ -193,7 +193,7 @@ public class EssentialsCommandHandler implements ICommandHandler, TabExecutor
if (pc != null) if (pc != null)
{ {
executed(commandLabel, pc.getLabel()); executed(commandLabel, pc);
try try
{ {
return pc.tabComplete(sender, commandLabel, args); return pc.tabComplete(sender, commandLabel, args);
@@ -404,13 +404,14 @@ public class EssentialsCommandHandler implements ICommandHandler, TabExecutor
return pcommands.get(0); return pcommands.get(0);
} }
public void executed(final String label, final String otherLabel) public void executed(final String label, final PluginCommand pc)
{ {
final String altString = pc.getPlugin().getName() + ":" + pc.getLabel();
if (ess.getSettings().isDebug()) if (ess.getSettings().isDebug())
{ {
LOGGER.log(Level.INFO, "Essentials: Alternative command " + label + " found, using " + otherLabel); LOGGER.log(Level.INFO, "Essentials: Alternative command " + label + " found, using " + altString);
} }
disabledList.put(label, otherLabel); disabledList.put(label, altString);
} }
@Override @Override