Search in sources :

Example 1 with HubCommand

use of me.candiesjar.fallbackserver.velocity.commands.HubCommand in project Fallback-Server by sasi2006166.

the class FallbackServerVelocity method loadCommands.

private void loadCommands(CommandManager commandManager) {
    CommandMeta commandMeta = commandManager.metaBuilder("").aliases(ConfigurationUtil.getConfig().getStringList("").toArray(new String[0])).build();
    commandManager.register(commandMeta, new HubCommand());
}
Also used : HubCommand(me.candiesjar.fallbackserver.velocity.commands.HubCommand) CommandMeta(com.velocitypowered.api.command.CommandMeta)

Example 2 with HubCommand

use of me.candiesjar.fallbackserver.velocity.commands.HubCommand in project Fallback-Server by sasi2006166.

the class FallbackServerVelocity method onProxyInitialization.

@Inject
public void onProxyInitialization(Logger logger, CommandManager commandManager, @DataDirectory Path path, VelocityMetrics.Factory metricsFactory) {
    // Instances
    logger.info("§7[§b!§7] Loading configuration §7[§b!§7]");
    instance = this;
    ConfigurationUtil.saveConfiguration(path);
    commandManager.register(Arrays.toString(ConfigurationUtil.getConfig().getStringList("").toArray(new String[0])), new HubCommand());
    commandManager.register("fsv", new FallbackVelocityCommand());
    loadStats(metricsFactory);
    logger.info("§aPlugin loaded.");
}
Also used : HubCommand(me.candiesjar.fallbackserver.velocity.commands.HubCommand) FallbackVelocityCommand(me.candiesjar.fallbackserver.velocity.commands.FallbackVelocityCommand) Inject(com.google.inject.Inject)

Aggregations

HubCommand (me.candiesjar.fallbackserver.velocity.commands.HubCommand)2 Inject (com.google.inject.Inject)1 CommandMeta (com.velocitypowered.api.command.CommandMeta)1 FallbackVelocityCommand (me.candiesjar.fallbackserver.velocity.commands.FallbackVelocityCommand)1