This at least removes the warnings & replaces the description fields

This commit is contained in:
CocoTheOwner 2021-08-06 12:09:32 +02:00
parent a0b8581ec5
commit 274469d299

View File

@ -561,10 +561,16 @@ public class SchemaBuilder {
}
private String getFieldDescription(Field r) {
if (r.isAnnotationPresent(Desc.class)) {
return r.getDeclaredAnnotation(Desc.class).value();
}
// suppress warnings on bukkit classes
if (r.getDeclaringClass().getName().startsWith("org.bukkit.")){
return "Bukkit package classes and enums have no descriptions";
}
warnings.addIfMissing("Missing @Desc on field " + r.getName() + " (" + r.getType() + ") in " + r.getDeclaringClass().getCanonicalName());
return "No Field Description";
}