Tweaks to command system to allow setting executors via plugins (no more ambiguous onCommand in plugins)

This commit is contained in:
Dinnerbone
2011-02-28 00:30:59 +00:00
parent caa5cc9325
commit 4fa84d995c
7 changed files with 48 additions and 39 deletions

View File

@@ -23,7 +23,7 @@ public final class SimpleCommandMap implements CommandMap {
private void setDefaultCommands(final Server server) {
register("bukkit", new VersionCommand("version", server));
register("bukkit", new ReloadCommand("reload", server));
register("bukkit", new PluginsCommand("plugins",server));
register("bukkit", new PluginsCommand("plugins", server));
}
/**
@@ -91,6 +91,10 @@ public final class SimpleCommandMap implements CommandMap {
}
}
public Command getCommand(String name) {
return knownCommands.get(name);
}
private static class VersionCommand extends Command {
private final Server server;