package com.nguyenquyhy.discordbridge.models;

import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;

/**
 * Created by Hy on 12/11/2016.
 */
@ConfigSerializable
public class ChannelMinecraftMentionConfig implements IConfigInheritable<ChannelMinecraftMentionConfig> {
    public ChannelMinecraftMentionConfig() {

    }

    /**
     * This is called only when the config file is first created.
     */
    void initializeDefault() {
        userTemplate = "&6@&e%a";
        roleTemplate = "&6@&a%r";
        everyoneTemplate = "&6@&3%a";
    }

    @Setting
    public String userTemplate;
    @Setting
    public String roleTemplate;
    @Setting
    public String everyoneTemplate;

    @Override
    public void inherit(ChannelMinecraftMentionConfig parent) {
        if (userTemplate == null) userTemplate = parent.userTemplate;
        if (roleTemplate == null) roleTemplate = parent.roleTemplate;
        if (everyoneTemplate == null) everyoneTemplate = parent.everyoneTemplate;
    }
}

@@ -537,16 +537,18 @@
 %22&6@&e%25a
+&r
 %22;%0A     
@@ -573,16 +573,18 @@
 %22&6@&a%25r
+&r
 %22;%0A     
@@ -613,16 +613,18 @@
 %22&6@&3%25a
+&r
 %22;%0A    %7D

Add reset color to default mention templates.