You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to allow plugin devs on platforms that provide MiniMessage a way to mutate the tag resolvers available in the global MiniMessage instance.
There are a few steps required before this is achievable:
All tags should have a namespace to allow for multiple tags to have the same name (e.g. <adventure:blue> or <myplugin:blue>). See Namespaced TagResolver API #696.
We need API to easily allow tag resolvers to be "locked" behind permissions with changing defaults. For example, we might want custom colours to be available to everyone but a money placeholder for admins or console only. Ideally this API would wrap over tags, with the global instance probably checking by default so we don't overcomplicate things.
We need the context object to provide an easy way to check against these permissions.
We need to allow the user to provide some context that can bypass all permission checks.
We need good and clear documentation for both developers and end users! Perhaps with an expansion of the community libraries page to signpost users towards neat new plugins/etc that have placeholders.
We also need to decide on how registration will look. Should it be a one-time startup thing or something that can be done post-initialisation?
We also need to take care not to introduce any crazy exploits. All "global" tags should require name spacing with a key and we should have strict, automatic permission checks by default (with every tag defaulting to requiring the permission to be present). This way we're guarding around devs being stupid by making it double opt-in to get your tag available in the "standard" (i.e. no additional context) calls to the global instance.
The text was updated successfully, but these errors were encountered:
kezz
changed the title
Allow mutating tag resolvers in the global MiniMssage instance after creation
Allow mutating tag resolvers in the global MiniMessage instance after creation
Mar 5, 2025
It would be nice to allow plugin devs on platforms that provide MiniMessage a way to mutate the tag resolvers available in the global MiniMessage instance.
There are a few steps required before this is achievable:
<adventure:blue> or <myplugin:blue>
). See NamespacedTagResolver
API #696.We also need to decide on how registration will look. Should it be a one-time startup thing or something that can be done post-initialisation?
We also need to take care not to introduce any crazy exploits. All "global" tags should require name spacing with a key and we should have strict, automatic permission checks by default (with every tag defaulting to requiring the permission to be present). This way we're guarding around devs being stupid by making it double opt-in to get your tag available in the "standard" (i.e. no additional context) calls to the global instance.
The text was updated successfully, but these errors were encountered: