Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.mpgc.kit;
- import java.io.File;
- import java.io.IOException;
- import org.bukkit.configuration.file.FileConfiguration;
- import org.bukkit.configuration.file.YamlConfiguration;
- public class Config {
- private static File file;
- public static FileConfiguration cfg;
- public Config(MainClass plugin) {
- Config.file = new File("plugins/selfMade", "KitPvP+.yml");
- Config.cfg = YamlConfiguration.loadConfiguration(file);
- Config.save();
- }
- public static void save() {
- try {
- Config.cfg.save(file);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- public FileConfiguration getCfg() {
- return cfg;
- }
- public static void loadConfig() throws IOException {
- cfg.save(file);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment