Moving colors to MConf
This commit is contained in:
		| @@ -25,19 +25,7 @@ public class ConfServer extends SimpleConfig | ||||
| 	public static List<String> baseCommandAliases = MUtil.list("f"); | ||||
| 	public static String dburi = "default"; | ||||
| 	 | ||||
| 	// -------------------------------------------- // | ||||
| 	// COLORS | ||||
| 	// -------------------------------------------- // | ||||
| 	 | ||||
| 	public static ChatColor colorMember = ChatColor.GREEN; | ||||
| 	public static ChatColor colorAlly = ChatColor.DARK_PURPLE; | ||||
| 	public static ChatColor colorTruce = ChatColor.LIGHT_PURPLE; | ||||
| 	public static ChatColor colorNeutral = ChatColor.WHITE; | ||||
| 	public static ChatColor colorEnemy = ChatColor.RED; | ||||
| 	 | ||||
| 	public static ChatColor colorNoPVP = ChatColor.GOLD; | ||||
| 	public static ChatColor colorFriendlyFire = ChatColor.DARK_RED; | ||||
| 	//public static ChatColor colorWilderness = ChatColor.DARK_GREEN; | ||||
| 	 | ||||
| 	// -------------------------------------------- // | ||||
| 	// DOUBTFULLY CONFIGURABLE DEFAULTS (TODO) | ||||
|   | ||||
| @@ -2,6 +2,8 @@ package com.massivecraft.factions; | ||||
|  | ||||
| import org.bukkit.ChatColor; | ||||
|  | ||||
| import com.massivecraft.factions.entity.MConf; | ||||
|  | ||||
|  | ||||
| public enum Rel | ||||
| { | ||||
| @@ -119,15 +121,15 @@ public enum Rel | ||||
| 	public ChatColor getColor() | ||||
| 	{ | ||||
| 		if (this.isAtLeast(RECRUIT)) | ||||
| 			return ConfServer.colorMember; | ||||
| 			return MConf.get().colorMember; | ||||
| 		else if (this == ALLY) | ||||
| 			return ConfServer.colorAlly; | ||||
| 			return MConf.get().colorAlly; | ||||
| 		else if (this == NEUTRAL) | ||||
| 			return ConfServer.colorNeutral; | ||||
| 			return MConf.get().colorNeutral; | ||||
| 		else if (this == TRUCE) | ||||
| 			return ConfServer.colorTruce; | ||||
| 			return MConf.get().colorTruce; | ||||
| 		else | ||||
| 			return ConfServer.colorEnemy; | ||||
| 			return MConf.get().colorEnemy; | ||||
| 	} | ||||
| 	 | ||||
| 	public String getPrefix() | ||||
|   | ||||
| @@ -1,5 +1,7 @@ | ||||
| package com.massivecraft.factions.entity; | ||||
|  | ||||
| import org.bukkit.ChatColor; | ||||
|  | ||||
| import com.massivecraft.mcore.MCore; | ||||
| import com.massivecraft.mcore.store.Entity; | ||||
|  | ||||
| @@ -15,8 +17,18 @@ public class MConf extends Entity<MConf> | ||||
| 	} | ||||
| 	 | ||||
| 	// -------------------------------------------- // | ||||
| 	// FIELDS | ||||
| 	// COLORS | ||||
| 	// -------------------------------------------- // | ||||
| 	 | ||||
| 	public ChatColor colorMember = ChatColor.GREEN; | ||||
| 	public ChatColor colorAlly = ChatColor.DARK_PURPLE; | ||||
| 	public ChatColor colorTruce = ChatColor.LIGHT_PURPLE; | ||||
| 	public ChatColor colorNeutral = ChatColor.WHITE; | ||||
| 	public ChatColor colorEnemy = ChatColor.RED; | ||||
| 	 | ||||
| 	public ChatColor colorNoPVP = ChatColor.GOLD; | ||||
| 	public ChatColor colorFriendlyFire = ChatColor.DARK_RED; | ||||
| 	//public ChatColor colorWilderness = ChatColor.DARK_GREEN; | ||||
| 	 | ||||
|  | ||||
| } | ||||
| @@ -2,12 +2,12 @@ package com.massivecraft.factions.util; | ||||
|  | ||||
| import org.bukkit.ChatColor; | ||||
|  | ||||
| import com.massivecraft.factions.ConfServer; | ||||
| import com.massivecraft.factions.FFlag; | ||||
| import com.massivecraft.factions.Rel; | ||||
| import com.massivecraft.factions.RelationParticipator; | ||||
| import com.massivecraft.factions.entity.FPlayer; | ||||
| import com.massivecraft.factions.entity.Faction; | ||||
| import com.massivecraft.factions.entity.MConf; | ||||
| import com.massivecraft.mcore.util.Txt; | ||||
|  | ||||
| public class RelationUtil | ||||
| @@ -135,12 +135,12 @@ public class RelationUtil | ||||
| 		{ | ||||
| 			if (thatFaction.getFlag(FFlag.FRIENDLYFIRE) == true) | ||||
| 			{ | ||||
| 				return ConfServer.colorFriendlyFire; | ||||
| 				return MConf.get().colorFriendlyFire; | ||||
| 			} | ||||
| 			 | ||||
| 			if (thatFaction.getFlag(FFlag.PVP) == false) | ||||
| 			{ | ||||
| 				return ConfServer.colorNoPVP; | ||||
| 				return MConf.get().colorNoPVP; | ||||
| 			} | ||||
| 		} | ||||
| 		return getRelationOfThatToMe(that, me).getColor(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 
				 Olof Larsson
					Olof Larsson