Created alchemy extension

This commit is contained in:
Auxilor
2020-11-26 09:13:22 +00:00
parent f8627836af
commit fbe1cd7a5f
7 changed files with 111 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
package com.willfp.ecoenchants.config;
import com.willfp.ecoenchants.EcoEnchantsPlugin;
import com.willfp.ecoenchants.util.Logger;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
@@ -43,6 +44,10 @@ public abstract class UpdatingYamlConfig {
config.load(configFile);
InputStream newIn = EcoEnchantsPlugin.getInstance().getResource(name);
if(newIn == null) {
Logger.error(name + " is null?");
return;
}
BufferedReader reader = new BufferedReader(new InputStreamReader(newIn, StandardCharsets.UTF_8));
YamlConfiguration newConfig = new YamlConfiguration();
newConfig.load(reader);