Ejemplo n.º 1
0
 public void loadAll() {
   String[] types = new String[] {"topSigns", "personalSigns"};
   sc.clearSigns();
   for (String type : types) {
     List<?> signs = config.getList(type);
     if (signs == null) continue;
     for (Object o : signs) {
       if (o == null || !(o instanceof StatSign)) continue;
       if (!stillSign((StatSign) o)) continue;
       sc.addSign((StatSign) o);
     }
   }
 }
Ejemplo n.º 2
0
  public void saveAll() {
    Map<String, StatSign> map = sc.getTopSigns();
    if (map != null) {
      List<StatSign> l = new ArrayList<StatSign>(map.values());
      config.set("topSigns", l);
    }
    map = sc.getPersonalSigns();
    if (map != null) {
      List<StatSign> l = new ArrayList<StatSign>(map.values());
      config.set("personalSigns", l);
    }

    save();
  }