Translate colors for blueprint descriptions.

https://github.com/BentoBoxWorld/BSkyBlock/issues/213
This commit is contained in:
tastybento 2019-11-02 17:09:47 -07:00
parent c2f2be61c3
commit 25ad177aca

View File

@ -287,6 +287,7 @@ public class BlueprintManagementPanel {
protected PanelItem getBlueprintItem(GameModeAddon addon, int pos, BlueprintBundle bb, Blueprint blueprint) { protected PanelItem getBlueprintItem(GameModeAddon addon, int pos, BlueprintBundle bb, Blueprint blueprint) {
// Create description // Create description
List<String> desc = blueprint.getDescription() == null ? new ArrayList<>() : blueprint.getDescription(); List<String> desc = blueprint.getDescription() == null ? new ArrayList<>() : blueprint.getDescription();
desc = desc.stream().map(l -> ChatColor.translateAlternateColorCodes('&', l)).collect(Collectors.toList());
if ((!blueprint.equals(endBlueprint) && !blueprint.equals(normalBlueprint) && !blueprint.equals(netherBlueprint))) { if ((!blueprint.equals(endBlueprint) && !blueprint.equals(normalBlueprint) && !blueprint.equals(netherBlueprint))) {
if ((pos > MIN_WORLD_SLOT && pos < MAX_WORLD_SLOT)) { if ((pos > MIN_WORLD_SLOT && pos < MAX_WORLD_SLOT)) {
desc.add(t("remove")); desc.add(t("remove"));