use of com.viaversion.viaversion.velocity.command.VelocityCommandHandler in project ViaVersion by ViaVersion.
the class VelocityPlugin method onProxyInit.
@Subscribe
public void onProxyInit(ProxyInitializeEvent e) {
if (!hasConnectionEvent()) {
// No way to disable the plugin :(
Logger logger = this.loggerslf4j;
logger.error(" / \\");
logger.error(" / \\");
logger.error(" / | \\");
logger.error(" / | \\ VELOCITY 3.0.0 IS REQUIRED");
logger.error(" / \\ VIAVERSION WILL NOT WORK AS INTENDED");
logger.error(" / o \\");
logger.error("/_____________\\");
}
PROXY = proxy;
VelocityCommandHandler commandHandler = new VelocityCommandHandler();
PROXY.getCommandManager().register("viaver", commandHandler, "vvvelocity", "viaversion");
api = new VelocityViaAPI();
conf = new VelocityViaConfig(configDir.toFile());
logger = new LoggerWrapper(loggerslf4j);
Via.init(ViaManagerImpl.builder().platform(this).commandHandler(commandHandler).loader(new VelocityViaLoader()).injector(new VelocityViaInjector()).build());
if (proxy.getPluginManager().getPlugin("viabackwards").isPresent()) {
MappingDataLoader.enableMappingsCache();
}
}
Aggregations