com.velocitypowered.api.plugin.annotation.DataDirectory Java Examples

The following examples show how to use com.velocitypowered.api.plugin.annotation.DataDirectory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VelocityPluginModule.java    From Velocity with MIT License 5 votes vote down vote up
@Override
public void configure(Binder binder) {
  binder.bind(description.getMainClass()).in(Scopes.SINGLETON);

  binder.bind(Logger.class).toInstance(LoggerFactory.getLogger(description.getId()));
  binder.bind(ProxyServer.class).toInstance(server);
  binder.bind(Path.class).annotatedWith(DataDirectory.class)
      .toInstance(basePluginPath.resolve(description.getId()));
  binder.bind(PluginDescription.class).toInstance(description);
  binder.bind(PluginManager.class).toInstance(server.getPluginManager());
  binder.bind(EventManager.class).toInstance(server.getEventManager());
  binder.bind(CommandManager.class).toInstance(server.getCommandManager());
}
 
Example #2
Source File: VelocitySparkPlugin.java    From spark with GNU General Public License v3.0 4 votes vote down vote up
@Inject
public VelocitySparkPlugin(ProxyServer proxy, @DataDirectory Path configDirectory) {
    this.proxy = proxy;
    this.configDirectory = configDirectory;
}
 
Example #3
Source File: SkinsRestorer.java    From SkinsRestorerX with GNU General Public License v3.0 4 votes vote down vote up
@Inject
public SkinsRestorer(ProxyServer proxy, Logger logger, @DataDirectory Path dataFolder) {
    this.proxy = proxy;
    this.logger = new SRLogger();
    this.dataFolder = dataFolder;
}
 
Example #4
Source File: PlanVelocity.java    From Plan with GNU Lesser General Public License v3.0 4 votes vote down vote up
@com.google.inject.Inject
public PlanVelocity(ProxyServer proxy, Logger slf4jLogger, @DataDirectory Path dataFolderPath) {
    super(proxy, slf4jLogger, dataFolderPath);
}
 
Example #5
Source File: VelocityPlugin.java    From ServerListPlus with GNU General Public License v3.0 4 votes vote down vote up
@Inject
public VelocityPlugin(Logger logger, ProxyServer proxy, @DataDirectory Path pluginFolder) {
    this.logger = logger;
    this.proxy = proxy;
    this.pluginFolder = pluginFolder;
}