Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. // f = File made in Main Class.
  2.  
  3. @EventHandler
  4. public void onPlayerQuit(PlayerQuitEvent e) {
  5. Player p = e.getPlayer();
  6. FileConfiguration fc = YamlConfiguration.loadConfiguration(Main.f);
  7. try {
  8. fc.set("players." + p.getName(), Main.hs.get(p.getName()));
  9. fc.save(Main.f);
  10. System.out.println(ChatColor.BLUE + "SAVED!");
  11. } catch (IOException e1) {
  12. e1.printStackTrace();
  13. }
  14. Main.hs.remove(p.getName());
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement