mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-23 10:35:15 +01:00
Move comments in above config fields.
This should help avoid confusions as it matches the class' annotation layout and almost every other plugin does it like this.
This commit is contained in:
parent
ae8d1c79e9
commit
88bffc6fde
@ -16,7 +16,11 @@ public class FieldParser {
|
||||
*/
|
||||
public static String parse(Field field) {
|
||||
StringBuilder builder = new StringBuilder(50);
|
||||
|
||||
|
||||
if (field.isAnnotationPresent(ConfigurationComment.class)) {
|
||||
builder.append('#').append(field.getAnnotation(ConfigurationComment.class).value()).append('\n');
|
||||
}
|
||||
|
||||
try {
|
||||
builder.append(field.getName()).append(": ").append(ValueParser.parseToYAML(field.get(null)));
|
||||
} catch (IllegalAccessException e) {
|
||||
@ -24,10 +28,6 @@ public class FieldParser {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (field.isAnnotationPresent(ConfigurationComment.class)) {
|
||||
builder.append('\n').append('#').append(field.getAnnotation(ConfigurationComment.class).value());
|
||||
}
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user