Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds progress and repeat tags #768

Open
wants to merge 6 commits into
base: main/4
Choose a base branch
from
Open

Conversation

AV3RG
Copy link

@AV3RG AV3RG commented May 30, 2022

No description provided.

Copy link
Member

@kezz kezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial comments, but looking good so far!

@Joo200
Copy link
Contributor

Joo200 commented May 30, 2022

TBH: I don't see the usecase for some stuff:

Why would you want to provide a static progress? Where would you use a tag from your unit tests?
For "<progress:0.5:|:10:green:#696969>" you could write <green>|||||<c:#696969>||||| and you're done.

Same stuff with the repeating tag. It could be nice to repeat some stuff but why is there no way for the api to provide a number?
smth like:
mm.deserialize("Hey, <repeat:":) ">", Formatter.repeat("repeat", 5));

Both progress and repeating tags shouldn't be considered as StandardTags.

And I disagree with the double supplier. Other tag resolver such as Placeholders or the existing Formatters don't have a Supplier, using Supplier now without a fallback to no supplier is a change in the api.

@AV3RG
Copy link
Author

AV3RG commented May 30, 2022

The initial idea behind both of these tags was to allow "placeholders" from different places, to be represented in ways not possible simply. You can use a double placeholder provided by some plugin like PAPI or even your own mini message placeholders and convert that into a progress bar without any extra effort.

Something like <repeat:<ability_left>:'<green>▇'> makes it so much easier for the end-user of plugins using mini-message to do crazy stuff with config.

Same with the repeat tag. The repeat tag also makes it easier to edit repeated things. Surely you can write ||||||||||||||| and then change that later on but the repeat tag makes it much easier to interpret.

@AV3RG AV3RG requested review from zml2008 and kezz and removed request for zml2008 and kezz August 27, 2022 13:56
@AV3RG AV3RG requested review from kezz and removed request for zml2008 December 9, 2022 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants