Exemplo n.º 1
0
 public static ResidenceManager loadMap(Map<String, Object> root, ResidenceManager resm)
     throws Exception {
   if (root != null) {
     for (Entry<String, Object> res : root.entrySet()) {
       try {
         resm.residences.put(
             res.getKey(), ClaimedResidence.load((Map<String, Object>) res.getValue(), null));
       } catch (Exception ex) {
         System.out.print(
             "[Residence] Failed to load residence ("
                 + res.getKey()
                 + ")! Reason:"
                 + ex.getMessage()
                 + " Error Log:");
         Logger.getLogger(ResidenceManager.class.getName()).log(Level.SEVERE, null, ex);
         if (Residence.getConfigManager().stopOnSaveError()) {
           throw (ex);
         }
       }
     }
   }
   return resm;
 }