Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //If we aren't using SQL lets run this.
- if (Config.getStorage().toLowerCase().contains("sql")) {
- return;
- }
- //Check to see if there is a configuration file.
- File yml = new File(plugin.getDataFolder(), "karma.yml");
- if (!yml.exists()) {
- try {
- plugin.getDataFolder().mkdirs();
- yml.createNewFile();
- } catch (IOException ex) {
- return;
- }
- }
- karmaConfig = new Configuration(yml);
- karmaConfig.load();
- for (String key : karmaConfig.getKeys()) {
- karmaMap.put(key, karmaConfig.getInt(key, 0));
- }
- karmaConfig.save();
Add Comment
Please, Sign In to add comment