當前位置: 首頁>>代碼示例>>Java>>正文


Java DefaultConfig類代碼示例

本文整理匯總了Java中org.spongepowered.api.config.DefaultConfig的典型用法代碼示例。如果您正苦於以下問題:Java DefaultConfig類的具體用法?Java DefaultConfig怎麽用?Java DefaultConfig使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DefaultConfig類屬於org.spongepowered.api.config包,在下文中一共展示了DefaultConfig類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: Phonon

import org.spongepowered.api.config.DefaultConfig; //導入依賴的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

示例2: HappyTrails

import org.spongepowered.api.config.DefaultConfig; //導入依賴的package包/類
@Inject
private HappyTrails(
        Logger logger,
        GameRegistry registry,
        PluginContainer container,
        @DefaultConfig(sharedRoot = false) Path defaultConfig,
        DataManager dataManager) {
    this.logger = logger;
    this.registry = registry;
    this.manager = dataManager;
    this.container = container;
    this.defaultConfig = defaultConfig;
    this.config = new TrailConfig();
    INSTANCE = this;
}
 
開發者ID:gabizou,項目名稱:HappyTrails,代碼行數:16,代碼來源:HappyTrails.java

示例3: UpdatifierPlugin

import org.spongepowered.api.config.DefaultConfig; //導入依賴的package包/類
@Inject
private UpdatifierPlugin(Injector injector, @DefaultConfig(sharedRoot = false) ConfigurationLoader<CommentedConfigurationNode> defaultRoot,
        Logger logger, SpongeStatsLite statsLite) {
    providedInjector = injector;
    this.defaultRoot = defaultRoot;
    this.logger = logger;
    this.statsLite = statsLite;
}
 
開發者ID:FlibioStudio,項目名稱:Updatifier,代碼行數:9,代碼來源:UpdatifierPlugin.java

示例4: equals

import org.spongepowered.api.config.DefaultConfig; //導入依賴的package包/類
@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }
    if (!(o instanceof DefaultConfig)) {
        return false;
    }
    final DefaultConfig that = (DefaultConfig) o;
    return sharedRoot() == that.sharedRoot();
}
 
開發者ID:LanternPowered,項目名稱:LanternServer,代碼行數:12,代碼來源:DefaultConfigAnnotation.java

示例5: Settings

import org.spongepowered.api.config.DefaultConfig; //導入依賴的package包/類
@Inject
Settings(Logger logger,
         @DefaultConfig(sharedRoot = true) ConfigurationLoader<CommentedConfigurationNode> configManager) {
    this.logger = logger;
    this.configManager = configManager;

    try {
        configMapper = ObjectMapper.forClass(Config.class).bindToNew();
    } catch (ObjectMappingException objMappingExc) {
        logger.error("Invalid plugin structure", objMappingExc);
    }
}
 
開發者ID:games647,項目名稱:HealthName,代碼行數:13,代碼來源:Settings.java

示例6: Settings

import org.spongepowered.api.config.DefaultConfig; //導入依賴的package包/類
@Inject
public Settings(Logger logger,
                @DefaultConfig(sharedRoot = true) ConfigurationLoader<CommentedConfigurationNode> configManager) {
    this.logger = logger;
    this.configManager = configManager;

    try {
        configMapper = ObjectMapper.forClass(Config.class).bindToNew();
    } catch (ObjectMappingException objMappingExc) {
        logger.error("Invalid plugin structure", objMappingExc);
    }
}
 
開發者ID:games647,項目名稱:ActionBroadcaster,代碼行數:13,代碼來源:Settings.java

示例7: Settings

import org.spongepowered.api.config.DefaultConfig; //導入依賴的package包/類
@Inject
Settings(Logger logger, @DefaultConfig(sharedRoot = false) Path configDir,
         @DefaultConfig(sharedRoot = false) ConfigurationLoader<CommentedConfigurationNode> configManager) {
    this.logger = logger;
    this.configDir = configDir;
    this.configManager = configManager;

    try {
        configMapper = ObjectMapper.forClass(Config.class).bindToNew();
    } catch (ObjectMappingException objMappingExc) {
        logger.error("Invalid plugin structure", objMappingExc);
    }
}
 
開發者ID:games647,項目名稱:TrackMe,代碼行數:14,代碼來源:Settings.java

示例8: Latch

import org.spongepowered.api.config.DefaultConfig; //導入依賴的package包/類
@Inject
public Latch(Logger logger, @DefaultConfig(sharedRoot = false) Path configPath, PluginContainer pluginContainer) {
    Latch.logger = logger;
    Latch.configPath = configPath;
    Latch.plugin = pluginContainer;
}
 
開發者ID:ichorpowered,項目名稱:latch,代碼行數:7,代碼來源:Latch.java

示例9: init

import org.spongepowered.api.config.DefaultConfig; //導入依賴的package包/類
@Inject
void init(@DefaultConfig(sharedRoot = false) Provider<Path> path) {
    this.path = path;
}
 
開發者ID:LanternPowered,項目名稱:LanternServer,代碼行數:5,代碼來源:PluginConfigurationModule.java

示例10: annotationType

import org.spongepowered.api.config.DefaultConfig; //導入依賴的package包/類
@Override
public Class<? extends Annotation> annotationType() {
    return DefaultConfig.class;
}
 
開發者ID:LanternPowered,項目名稱:LanternServer,代碼行數:5,代碼來源:DefaultConfigAnnotation.java


注:本文中的org.spongepowered.api.config.DefaultConfig類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。