diff --git a/src/main/java/com/Acrobot/Breeze/Configuration/FieldParser.java b/src/main/java/com/Acrobot/Breeze/Configuration/FieldParser.java index 723d1ba..c240c48 100644 --- a/src/main/java/com/Acrobot/Breeze/Configuration/FieldParser.java +++ b/src/main/java/com/Acrobot/Breeze/Configuration/FieldParser.java @@ -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(); } }