當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。