SpongeAPI icon indicating copy to clipboard operation
SpongeAPI copied to clipboard

TextTemplate does not support multiple colors

Open bloodmc opened this issue 7 years ago • 1 comments
trafficstars

public TextTemplate claimCreateSuccess = TextTemplate.of(TextColors.GREEN, TextTemplate.arg("type"), TextColors.AQUA, " created!", TextColors.LIGHT_PURPLE, "Use /trust to share it with friends.");

Here is a screenshot showing output of the above text template.

bug

The issues I see are as follows

  1. You cannot use multiple colors as the last specified seems to win.
  2. TextColors.GREEN should make argument green. I know you can set the arg color on the template itself but this shouldn't be required.
  3. TextTemplate args should support passing colors with the argument.

bloodmc avatar Jun 27 '18 19:06 bloodmc

Possibly related to https://github.com/SpongePowered/SpongeCommon/issues/1152

randombyte-developer avatar Jul 29 '18 19:07 randombyte-developer

Hey! You seem to be running an unsupported version (API 7) of SpongeAPI. Support for API 7 ended in January 2022.

API-7 is now end-of-life. We will not be issuing any more API updates for version 7 of our API^1

As part of our legacy cleanup we are closing issues relating to API7/1.12.2^2


The Text API is now supplied by the Kyori Adventure library so this issue is no longer relevant to this repository.

ImMorpheus avatar Nov 01 '22 19:11 ImMorpheus