log.warning(name + " is not a valid script and was ignored!");
return;
}
if (clazz.isAnnotationPresent(ScriptManifest.class)) {
final FileScriptDefinition def = new FileScriptDefinition();
final ScriptManifest manifest = clazz.getAnnotation(ScriptManifest.class);
def.id = 0;
def.name = manifest.name();
def.authors = manifest.authors();
def.version = manifest.version();
def.keywords = manifest.keywords();
def.description = manifest.description();
def.website = manifest.website();
def.clazz = clazz;
def.path = path;
def.obfuscated = manifest.obfuscated();
if (manifest.requiresVersion() <= Configuration.getVersion()) {
scripts.add(def);
}
}
}