adventure icon indicating copy to clipboard operation
adventure copied to clipboard

adds progress and repeat tags

Open AV3RG opened this issue 3 years ago • 2 comments

AV3RG avatar May 30 '22 17:05 AV3RG

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.

Joo200 avatar May 30 '22 17:05 Joo200

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 avatar May 30 '22 18:05 AV3RG