/**
 * PermissionsEx
 * Copyright (C) zml and PermissionsEx contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package ninja.leaping.permissionsex.config;

import ninja.leaping.configurate.objectmapping.ObjectMapper;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.permissionsex.backends.DataStore;

import java.util.Map;

/**
 * Configuration for PermissionsEx. This is designed to be serialized with a Configurate {@link ObjectMapper}
 */
public class PermissionsExConfiguration {
    public static final ObjectMapper<PermissionsExConfiguration> MAPPER;

    static {
        try {
            MAPPER = ObjectMapper.mapperForClass(PermissionsExConfiguration.class);
        } catch (ObjectMappingException e) {
            throw new ExceptionInInitializerError(e);
        }
    }

    @Setting("backends") private Map<String, DataStore> backends;
    @Setting("default-backend") private String defaultBackend;
    @Setting("debug") private boolean debugEnabled;

    protected PermissionsExConfiguration() {}

    public DataStore getDataStore(String name) {
        return backends.get(name);
    }

    public DataStore getDefaultDataStore() {
        return backends.get(defaultBackend);
    }

    public boolean isDebugEnabled() {
        return debugEnabled;
    }
}

@@ -1416,20 +1416,8 @@
 ting
-(%22backends%22)
  pri
@@ -1533,17 +1533,8 @@
 ting
-(%22debug%22)
  pri
@@ -1551,23 +1551,16 @@
 an debug
-Enabled
 ;%0A%0A    p
@@ -1847,23 +1847,16 @@
 rn debug
-Enabled
 ;%0A    %7D%0A

Remove @Setting path declarations where not necessary