mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 02:59:55 +01:00
Don't register commands only on init
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
7d69668caa
commit
912a9c2c1a
1 changed files with 1 additions and 7 deletions
|
@ -66,10 +66,10 @@ public final class CraftServer implements Server {
|
||||||
private final String serverName = "Craftbukkit";
|
private final String serverName = "Craftbukkit";
|
||||||
private final String serverVersion;
|
private final String serverVersion;
|
||||||
private final String protocolVersion = "1.6.6";
|
private final String protocolVersion = "1.6.6";
|
||||||
private final PluginManager pluginManager = new SimplePluginManager(this);
|
|
||||||
private final ServicesManager servicesManager = new SimpleServicesManager();
|
private final ServicesManager servicesManager = new SimpleServicesManager();
|
||||||
private final BukkitScheduler scheduler = new CraftScheduler(this);
|
private final BukkitScheduler scheduler = new CraftScheduler(this);
|
||||||
private final SimpleCommandMap commandMap = new SimpleCommandMap(this);
|
private final SimpleCommandMap commandMap = new SimpleCommandMap(this);
|
||||||
|
private final PluginManager pluginManager = new SimplePluginManager(this, commandMap);
|
||||||
protected final MinecraftServer console;
|
protected final MinecraftServer console;
|
||||||
protected final ServerConfigurationManager server;
|
protected final ServerConfigurationManager server;
|
||||||
private final Map<String, World> worlds = new LinkedHashMap<String, World>();
|
private final Map<String, World> worlds = new LinkedHashMap<String, World>();
|
||||||
|
@ -147,12 +147,6 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadPlugin(Plugin plugin) {
|
private void loadPlugin(Plugin plugin) {
|
||||||
List<Command> pluginCommands = PluginCommandYamlParser.parse(plugin);
|
|
||||||
|
|
||||||
if (!pluginCommands.isEmpty()) {
|
|
||||||
commandMap.registerAll(plugin.getDescription().getName(), pluginCommands);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
pluginManager.enablePlugin(plugin);
|
pluginManager.enablePlugin(plugin);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
|
|
Loading…
Reference in a new issue