Package org.spout.cereal.config.annotated

Examples of org.spout.cereal.config.annotated.AnnotatedObjectConfiguration


    }
    Serialization.registerSerializer(new ColorSerializer());
  }

  public static void load(Configuration config) {
    final AnnotatedObjectConfiguration biomes =
        new AnnotatedObjectConfiguration(config);
    for (Entry<String, VanillaBiome> entry : BY_NAME.entrySet()) {
      biomes.add(entry.getValue(), entry.getKey());
    }
    try {
      biomes.load();
    } catch (ConfigurationException ex) {
      ex.printStackTrace();
    }
  }
View Full Code Here


      ex.printStackTrace();
    }
  }

  public static void save(Configuration config) {
    final AnnotatedObjectConfiguration biomes =
        new AnnotatedObjectConfiguration(config);
    for (Entry<String, VanillaBiome> entry : BY_NAME.entrySet()) {
      biomes.add(entry.getValue(), entry.getKey());
    }
    try {
      biomes.save();
    } catch (ConfigurationException ex) {
      ex.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of org.spout.cereal.config.annotated.AnnotatedObjectConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.