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

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2011-02-28 00:30:59 +00:00
parent 258fa8e21c
commit 0a0e475f83
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;