Esempio n. 1
0
 public static void copyTemplates() throws IOException {
   for (TypeBase type : map.values()) {
     type.copyTemplateFile(HTMLGenerator.templateFolder);
   }
 }
Esempio n. 2
0
 /**
  * Internal method
  *
  * @param configuration passed on to types
  */
 public static void doConfig(Configuration configuration) {
   for (TypeBase type : map.values()) {
     type.doConfig(configuration);
   }
 }
Esempio n. 3
0
 public static void registerPermissions() {
   for (TypeBase type : map.values()) {
     PermissionsHandler.register(type.getPermissionNodes());
   }
 }
Esempio n. 4
0
 /**
  * Register your type here, in pre-preInit!
  *
  * @param typeBase the instance you want to register
  * @throws IllegalArgumentException if the name has been taken
  */
 public static void register(TypeBase typeBase) {
   if (map.put(typeBase.getName().toLowerCase(), typeBase) != null)
     throw new IllegalArgumentException("Duplicate type!");
 }