Players need to have unique objectives

This commit is contained in:
nossr50
2019-01-11 05:26:05 -08:00
parent adc83d29a7
commit f11b98c29d
14 changed files with 262 additions and 90 deletions

View File

@ -711,7 +711,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
case SUBSKILL_UNLOCKED:
key = "SubSkillUnlocked";
break;
case TOOL_READY:
case TOOL:
key = "ToolReady";
break;
case SUPER_ABILITY:
@ -781,16 +781,25 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
return config.getBoolean("Style.JSON.Hover.Details.Description.Underlined");
}
public ChatColor getJSONActionBarColor(NotificationType notificationType)
{
return getChatColor(LocaleLoader.getString("Style.JSON.Notification."+notificationType.toString()+".Color"));
}
private ChatColor getChatColorFromKey(String keyLocation) {
String colorName = LocaleLoader.getString(keyLocation);
return getChatColor(colorName);
}
private ChatColor getChatColor(String configColor) {
for (ChatColor chatColor : ChatColor.values()) {
if (colorName.equalsIgnoreCase(chatColor.toString()))
if (configColor.equalsIgnoreCase(chatColor.getName()))
return chatColor;
}
//Invalid Color
System.out.println("[mcMMO] " + colorName + " is an invalid color value for key " + keyLocation);
System.out.println("[mcMMO] " + configColor + " is an invalid color value");
return ChatColor.WHITE;
}