Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // f = File made in Main Class.
- @EventHandler
- public void onPlayerQuit(PlayerQuitEvent e) {
- Player p = e.getPlayer();
- FileConfiguration fc = YamlConfiguration.loadConfiguration(Main.f);
- try {
- fc.set("players." + p.getName(), Main.hs.get(p.getName()));
- fc.save(Main.f);
- System.out.println(ChatColor.BLUE + "SAVED!");
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- Main.hs.remove(p.getName());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement