package com.ericgrandt.config;

import org.spongepowered.configurate.objectmapping.ConfigSerializable;
import org.spongepowered.configurate.objectmapping.meta.Setting;

@ConfigSerializable
public class DefaultConfiguration {
    @Setting("database")
    private final DatabaseSettings databaseSettings = new DatabaseSettings();

    public String getConnectionString() {
        return String.format(
            "%s?user=%s&password=%s",
            databaseSettings.getConnectionString(),
            databaseSettings.getUser(),
            databaseSettings.getPassword()
        );
    }
}

@ConfigSerializable
class DatabaseSettings {
    public String getConnectionString() {
        return  "jdbc:mysql://localhost:3306/totaleconomy";
    }

    public String getUser() {
        return "user";
    }

    public String getPassword() {
        return "password";
    }
}
@@ -632,38 +632,52 @@
 tings %7B%0A    
-public
+@Setting%0A    private
  String 
 getConnectio
@@ -656,36 +656,33 @@
  private String 
-getC
+c
 onnectionString(
@@ -680,36 +680,18 @@
 onString
-() %7B%0A        return
  
+=
  %22jdbc:m
@@ -726,16 +726,197 @@
 conomy%22;
+%0A%0A    @Setting%0A    private String user = %22user%22;%0A%0A    @Setting%0A    private String password = %22password%22;%0A%0A    public String getConnectionString() %7B%0A        return  connectionString;
 %0A    %7D%0A%0A
@@ -960,22 +960,20 @@
  return 
-%22
 user
-%22
 ;%0A    %7D%0A
@@ -1022,25 +1022,24 @@
  return 
-%22
 password
 %22;%0A    %7D
@@ -1030,17 +1030,16 @@
 password
-%22
 ;%0A    %7D%0A

Update DefaultConfiguration.java