package org.royaldev.royalcommands;

import org.bukkit.ChatColor;

public enum MessageColor {

    NEGATIVE(Config.negativeChatColor, ChatColor.RED),
    NEUTRAL(Config.neutralChatColor, ChatColor.GRAY),
    POSITIVE(Config.positiveChatColor, ChatColor.BLUE),
    RESET(Config.resetChatColor, ChatColor.RESET);

    private ChatColor c;

    MessageColor(String custom, ChatColor def) {
        try {
            this.c = ChatColor.valueOf(custom.toUpperCase());
        } catch (IllegalArgumentException e) {
            this.c = def;
        }
    }

    public ChatColor _() {
        return this.getChatColor();
    }

    public ChatColor getChatColor() {
        return this.c;
    }

    @Override
    public String toString() {
        return this.c.toString();
    }

}

@@ -105,34 +105,8 @@
 IVE(
-Config.negativeChatColor, 
 Chat
@@ -133,33 +133,8 @@
 RAL(
-Config.neutralChatColor, 
 Chat
@@ -163,34 +163,8 @@
 IVE(
-Config.positiveChatColor, 
 Chat
@@ -190,31 +190,8 @@
 SET(
-Config.resetChatColor, 
 Chat
@@ -217,16 +217,22 @@
 private 
+final 
 ChatColo
@@ -233,17 +233,19 @@
 atColor 
-c
+def
 ;%0A%0A    M
@@ -260,36 +260,188 @@
 lor(
-String custom, ChatColor def
+final ChatColor def) %7B%0A        this.def = def;%0A    %7D%0A%0A    public ChatColor _() %7B%0A        return this.getChatColor();%0A    %7D%0A%0A    protected ChatColor byStringOrDefault(final String s
 ) %7B%0A
@@ -466,24 +466,22 @@
         
-this.c =
+return
  ChatCol
@@ -495,14 +495,9 @@
 eOf(
-custom
+s
 .toU
@@ -526,16 +526,22 @@
  catch (
+final 
 IllegalA
@@ -558,16 +558,17 @@
 eption e
+x
 ) %7B%0A    
@@ -579,17 +579,20 @@
     
+return 
 this.
-c = 
 def;
@@ -622,33 +622,44 @@
 ublic ChatColor 
-_
+getChatColor
 () %7B%0A        ret
@@ -651,39 +651,126 @@
 ) %7B%0A        
-return this.get
+final String s;%0A        switch (this) %7B%0A            case NEGATIVE:%0A                s = Config.negative
 ChatColor();
@@ -770,56 +770,369 @@
 olor
-()
 ;%0A    
-%7D%0A%0A    public ChatColor getChatColor() %7B
+            break;%0A            case NEUTRAL:%0A                s = Config.neutralChatColor;%0A                break;%0A            case POSITIVE:%0A                s = Config.positiveChatColor;%0A                break;%0A            case RESET:%0A                s = Config.resetChatColor;%0A                break;%0A            default:%0A                s = null;%0A        %7D
 %0A   
@@ -1148,17 +1148,36 @@
 rn this.
-c
+byStringOrDefault(s)
 ;%0A    %7D%0A
@@ -1242,17 +1242,30 @@
 rn this.
-c
+getChatColor()
 .toStrin

Make MessageColor dynamic