package com.Acrobot.Breeze.Configuration;

import com.Acrobot.Breeze.Configuration.Annotations.ConfigurationComment;

import java.lang.reflect.Field;

/**
 * @author Acrobot
 */
public class FieldParser {
    /**
     * Parses a field into a YAML-compatible string
     *
     * @param field Field to parse
     * @return Parsed field
     */
    public static String parse(Field field) {
        StringBuilder builder = new StringBuilder(50);

        try {
            builder.append(field.getName()).append(": ").append(ValueParser.parseToYAML(field.get(null)));
        } catch (IllegalAccessException e) {
            e.printStackTrace();
            return "";
        }

        if (field.isAnnotationPresent(ConfigurationComment.class)) {
            builder.append('\n').append('#').append(field.getAnnotation(ConfigurationComment.class).value());
        }

        return builder.toString();
    }
}

@@ -437,16 +437,222 @@
 er(50);%0A
+        %0A        if (field.isAnnotationPresent(ConfigurationComment.class)) %7B%0A            builder.append('#').append(field.getAnnotation(ConfigurationComment.class).value()).append('%5Cn');%0A        %7D%0A        
 %0A       
@@ -881,198 +881,8 @@
  %7D%0A%0A
-        if (field.isAnnotationPresent(ConfigurationComment.class)) %7B%0A            builder.append('%5Cn').append('#').append(field.getAnnotation(ConfigurationComment.class).value());%0A        %7D%0A%0A
     

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.