Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<String> addto = config.getStringList("kits." + kitName + ".items");
- addto.add(item.toString());
- config.set("kits." + kitName + ".items", addto);
- try
- {
- config.save(new File("plugins" + File.separator + "Essentials" + File.separator + "config.yml"));
- config.load(new File("plugins" + File.separator + "Essentials" + File.separator + "config.yml"));
- }
- catch (IOException e)
- {
- Bukkit.getServer().getLogger().log(
- Level.SEVERE,
- "Unable to save configuration file! Caused by: " +
- e.getMessage());
- }
- catch (InvalidConfigurationException e)
- {
- Bukkit.getServer().getLogger().log(Level.SEVERE,
- "Invalid configuration! Caused by: " + e.getMessage());
- }
- Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "essentials reload");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement