Exemplo n.º 1
0
 /** @return the prototypes */
 public List<EntityPrototype> getPrototypes() {
   return holder.getPrototypes();
 }
Exemplo n.º 2
0
 /**
  * Load prototypes from the given reader and insert them into this database. If any of the
  * prototypes has an id that is already in use, an exception will be thrown.
  *
  * @param input the input reader (YAML)
  * @param classLoader Class loader used for resolving {@code !class} and @{code !!} directives in
  *     YAML.
  */
 public void load(Reader input, ClassLoader classLoader) {
   final Yaml yaml = prepareLoader(classLoader);
   final Holder newHolder = (Holder) yaml.load(input);
   holder.setPrototypes(newHolder.getPrototypes());
   logger.info("Loaded " + newHolder.prototypes.size() + " prototypes");
 }