本文整理匯總了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()));
}
示例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;
}
示例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;
}
示例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();
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例9: init
import org.spongepowered.api.config.DefaultConfig; //導入依賴的package包/類
@Inject
void init(@DefaultConfig(sharedRoot = false) Provider<Path> path) {
this.path = path;
}
示例10: annotationType
import org.spongepowered.api.config.DefaultConfig; //導入依賴的package包/類
@Override
public Class<? extends Annotation> annotationType() {
return DefaultConfig.class;
}