当前位置: 首页>>代码示例>>Java>>正文


Java ConfigDir类代码示例

本文整理汇总了Java中org.spongepowered.api.config.ConfigDir的典型用法代码示例。如果您正苦于以下问题:Java ConfigDir类的具体用法?Java ConfigDir怎么用?Java ConfigDir使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConfigDir类属于org.spongepowered.api.config包,在下文中一共展示了ConfigDir类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: VirtualTool

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
@Inject
public VirtualTool(@ConfigDir(sharedRoot = true) Path path, Logger logger, PluginContainer container) {
    this.dataDir = Sponge.getGame().getSavesDirectory().resolve(PluginData.id);
    this.pluginContainer = container;
    this.logger = new VTLogger(CText.get(CText.Colors.BLUE, 1, "V") + CText.get(CText.Colors.MAGENTA, 0, "T"));
    this.configdirpath = path.resolve(PluginData.id);
    this.backpackDir = Paths.get(this.getConfigPath().toString(), "backpacks");
    this.configfullpath = Paths.get(this.getConfigPath().toString(), "config.json");
    this.settings = new Settings();
}
 
开发者ID:poqdavid,项目名称:VirtualTool,代码行数:11,代码来源:VirtualTool.java

示例2: AmicusCore

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
@Inject
public AmicusCore(@ConfigDir(sharedRoot = false) @Nonnull final Path configDir,
                  @Nonnull final Game game) {
    instance = this;
    this.configProfiles = Maps.newHashMap();
    this.configDir = configDir;
    this.game = game;

    this.configProfilesFile = this.loadConfig();
}
 
开发者ID:FerusTech,项目名称:Amicus,代码行数:11,代码来源:AmicusCore.java

示例3: IPLog

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
@Inject
public IPLog(Logger logger, @ConfigDir(sharedRoot = false) Path path, PluginContainer pluginContainer) {
    plugin = this;

    this.logger = logger;
    this.parentPath = path;
    this.pluginContainer = pluginContainer;
}
 
开发者ID:ichorpowered,项目名称:iplog,代码行数:9,代码来源:IPLog.java

示例4: Phonon

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
@Inject
public Phonon(Logger logger, @DefaultConfig(sharedRoot = false) ConfigurationLoader<CommentedConfigurationNode> loader,
        @ConfigDir(sharedRoot = false) Path configDir, GuiceObjectMapperFactory factory) {
    this.logger = logger;
    this.loader = loader;
    this.configDir = configDir;
    this.factory = factory;
    this.configs = new HashMap<>();
    this.phononCommand = new PhononCommand();
    this.phononInjector = Guice.createInjector(new InjectorModule(this, this.phononCommand, new DiscordBot()));
}
 
开发者ID:NucleusPowered,项目名称:Phonon,代码行数:12,代码来源:Phonon.java

示例5: CatClearLag

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
@Inject
public CatClearLag(Logger logger, Game game, @ConfigDir(sharedRoot = false) File configDir, GuiceObjectMapperFactory factory) {
    this.logger = logger;
    this.game = game;
    this.configDir = configDir;
    this.factory = factory;
    instance = this;
}
 
开发者ID:Time6628,项目名称:CatClearLag,代码行数:9,代码来源:CatClearLag.java

示例6: equals

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }
    if (!(o instanceof ConfigDir)) {
        return false;
    }
    final ConfigDir that = (ConfigDir) o;
    return sharedRoot() == that.sharedRoot();
}
 
开发者ID:LanternPowered,项目名称:LanternServer,代码行数:12,代码来源:ConfigDirAnnotation.java

示例7: MinigameCore

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
@Inject
private MinigameCore(@ConfigDir(sharedRoot = false) Path configDir, Injector defaultInjector, Logger logger, PluginContainer pluginContainer) {
    this.configDir = configDir;
    this.defaultInjector = defaultInjector;
    this.pluginContainer = pluginContainer;
    this.logger = logger;
}
 
开发者ID:MinigameCore,项目名称:MinigameCore,代码行数:8,代码来源:MinigameCore.java

示例8: Settings

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
@Inject
//We will place more than one config there (i.e. H2/SQLite database)
public Settings(Logger logger, @ConfigDir(sharedRoot = false) Path dataFolder) {
    this.logger = logger;
    this.dataFolder = dataFolder;

    try {
        configMapper = ObjectMapper.forClass(Config.class).bindToNew();
        textMapper = ObjectMapper.forClass(TextConfig.class).bindToNew();
    } catch (ObjectMappingException objMappingExc) {
        logger.error("Invalid plugin structure", objMappingExc);
    }
}
 
开发者ID:games647,项目名称:FlexibleLogin,代码行数:14,代码来源:Settings.java

示例9: LabyRegen

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
@Inject
public LabyRegen(@ConfigDir(sharedRoot = false) Path pluginConfig, PluginContainer pluginContainer, Logger logger) {
    this.pluginConfig = pluginConfig;
    this.pluginContainer = pluginContainer;
    this.logger = logger;
}
 
开发者ID:YggLabs,项目名称:LabyRegen,代码行数:7,代码来源:LabyRegen.java

示例10: init

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
@Inject
void init(@ConfigDir(sharedRoot = false) Provider<Path> path) {
    this.path = path;
}
 
开发者ID:LanternPowered,项目名称:LanternServer,代码行数:5,代码来源:PluginConfigurationModule.java

示例11: annotationType

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
@Override
public Class<? extends Annotation> annotationType() {
    return ConfigDir.class;
}
 
开发者ID:LanternPowered,项目名称:LanternServer,代码行数:5,代码来源:ConfigDirAnnotation.java

示例12: SpongeStatsLite

import org.spongepowered.api.config.ConfigDir; //导入依赖的package包/类
/**
 * Constructs a new {@link SpongeStatsLite} client. Normally this should
 * be not called manually, but rather through an Guice {@link Inject}.
 *
 * @param plugin The plugin container
 * @param configDir The shared config directory
 * @see SpongeStatsLite
 */
@Inject
public SpongeStatsLite(PluginContainer plugin, @ConfigDir(sharedRoot = true) Path configDir) {
    super(configDir);
    this.plugin = requireNonNull(plugin, "plugin");
}
 
开发者ID:Minecrell,项目名称:statslite,代码行数:14,代码来源:SpongeStatsLite.java


注:本文中的org.spongepowered.api.config.ConfigDir类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。