mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 18:45:21 +01:00
Fix default plugin.conf not being generated correctly
This commit is contained in:
parent
c8523c1696
commit
576313bd35
@ -70,7 +70,6 @@ public class BlueMapService {
|
||||
private ThrowingFunction<UUID, String, IOException> worldNameProvider;
|
||||
|
||||
private ConfigManager configManager;
|
||||
private boolean resourceConfigLoaded = false;
|
||||
|
||||
private CoreConfig coreConfig;
|
||||
private RenderConfig renderConfig;
|
||||
@ -168,10 +167,13 @@ private synchronized void loadWorldsAndMaps() throws IOException {
|
||||
continue;
|
||||
}
|
||||
|
||||
ConfigManager configManager = getConfigManager();
|
||||
configManager.loadResourceConfigs(configFolder, getResourcePack());
|
||||
|
||||
World world = worlds.get(worldUUID);
|
||||
if (world == null) {
|
||||
try {
|
||||
world = MCAWorld.load(worldFolder.toPath(), worldUUID, minecraftVersion, getConfigManager().getBlockIdConfig(), getConfigManager().getBlockPropertiesConfig(), getConfigManager().getBiomeConfig(), worldNameProvider.apply(worldUUID), true);
|
||||
world = MCAWorld.load(worldFolder.toPath(), worldUUID, minecraftVersion, configManager.getBlockIdConfig(), configManager.getBlockPropertiesConfig(), configManager.getBiomeConfig(), worldNameProvider.apply(worldUUID), true);
|
||||
worlds.put(worldUUID, world);
|
||||
} catch (MissingResourcesException e) {
|
||||
throw e; // rethrow this to stop loading and display resource-missing message
|
||||
@ -272,11 +274,6 @@ public synchronized ResourcePack getResourcePack() throws IOException, MissingRe
|
||||
}
|
||||
|
||||
public synchronized ConfigManager getConfigManager() throws IOException {
|
||||
if (!resourceConfigLoaded) {
|
||||
configManager.loadResourceConfigs(configFolder, getResourcePack());
|
||||
resourceConfigLoaded = true;
|
||||
}
|
||||
|
||||
return configManager;
|
||||
}
|
||||
|
||||
|
@ -101,22 +101,19 @@ public synchronized void load() throws IOException, ParseResourceException {
|
||||
CoreConfig coreConfig = blueMap.getCoreConfig();
|
||||
RenderConfig renderConfig = blueMap.getRenderConfig();
|
||||
WebServerConfig webServerConfig = blueMap.getWebServerConfig();
|
||||
|
||||
//load plugin config
|
||||
pluginConfig = new PluginConfig(blueMap.getConfigManager().loadOrCreate(
|
||||
new File(serverInterface.getConfigFolder(), "plugin.conf"),
|
||||
Plugin.class.getResource("/plugin.conf"),
|
||||
Plugin.class.getResource("/plugin-defaults.conf"),
|
||||
true,
|
||||
true
|
||||
));
|
||||
|
||||
//try load resources
|
||||
try {
|
||||
|
||||
//load plugin config
|
||||
pluginConfig = new PluginConfig(blueMap.getConfigManager().loadOrCreate(
|
||||
new File(serverInterface.getConfigFolder(), "plugin.conf"),
|
||||
Plugin.class.getResource("/plugin.conf"),
|
||||
Plugin.class.getResource("/plugin-defaults.conf"),
|
||||
true,
|
||||
true
|
||||
));
|
||||
|
||||
//make sure resources are loaded
|
||||
getResourcePack();
|
||||
|
||||
} catch (MissingResourcesException ex) {
|
||||
Logger.global.logWarning("BlueMap is missing important resources!");
|
||||
Logger.global.logWarning("You need to accept the download of the required files in order of BlueMap to work!");
|
||||
|
Loading…
Reference in New Issue
Block a user