adventure icon indicating copy to clipboard operation
adventure copied to clipboard

Add replaceText to Title

Open MiniDay opened this issue 3 years ago • 4 comments

as the title, it is suggested to add replaceText to the title

  @Contract(pure = true)
  @NotNull Component replaceText(final @NotNull TextReplacementConfig config);

allow it to replace text in both title and subtitle

MiniDay avatar Jan 20 '22 15:01 MiniDay

I don't like this. I'd be much more in favour of some sort of function that can mutate a title or something. Seems much more useful than this relatively useless utility method.

kezz avatar Jan 20 '22 15:01 kezz

Yeah, I think this is too specialized as well. A general-purpose title.editAll(), or title.edit(titleConsumer, subtitleConsumer) might make more sense?

zml2008 avatar Jan 20 '22 22:01 zml2008

Perhaps a builder for titles could solve this and serve as a general purpose builder

thiccaxe avatar Jan 20 '22 23:01 thiccaxe

seems sensible yeah, a title builder would be a good addition

zml2008 avatar Jan 21 '22 23:01 zml2008