예제 #1
0
 @EventHandler(priority = EventPriority.NORMAL)
 public void onPlayerQuit(PlayerQuitEvent event) {
   try {
     if (!economiesLoaded()) {
       return;
     }
     Location l = event.getPlayer().getLocation();
     String name = event.getPlayer().getName();
     if (!hasAccount(name)) {
       addPlayer(name);
     }
     if (hyperPlayers.containsKey(name)) {
       HyperPlayer hp = hyperPlayers.get(name);
       if (hp == null) {
         return;
       }
       hp.setX(l.getX());
       hp.setY(l.getY());
       hp.setZ(l.getZ());
       hp.setWorld(l.getWorld().getName());
     }
   } catch (Exception e) {
     hc.gDB().writeError(e);
   }
 }