KyoriPowered / adventure

A user-interface library, formerly known as text, for Minecraft: Java Edition
https://docs.advntr.dev/
MIT License
678 stars 103 forks source link

Filtering tag provider #1057

Open kezz opened 3 months ago

kezz commented 3 months ago

Given the introduction of contextual MiniMessage parses, it would be nice to provide (perhaps in the builder?) a way to "filter" the tags. This would be left entirely up to the end user to implement, but the idea would be that we would allow a more "central" MiniMessage instance, with filtering done dynamically.

For example, it could look something like:

builder.dynamicTagFiltering(tagName, context -> context.targetAsType(Player.class).hasPermission("myplugin.tags." + tagName));