PaperMC / PaperMC/adventure

Namespaced `TagResolver` API

Open
#696 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area: text-minimessage type: enhancement
Dominant language
Java
Stars
887
Forks
160
PR merge metrics
No merged PRs in 30d

Description

For situations where users may want to have multiple sources contribute to a TagResolver, it may make sense to have identify tags by Key rather than just a plain value.

This would have a default namespace, for example adventure, and other namespaces could be registered.

The API would look something like:

interface TagResolver {
  interface NamespacedBuilder {
    self defaultNamespace(String);
    self namespaceResolver(String namespace, TagResolver resolver);
    self tag(Key tag, Tag);
    self tag(Key tag, BiFunction<ArgumentQueue, Context, Tag> factory);
    TagResolver build();
  }
}

This would allow platforms to collect custom tags that could safely be made available globally.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing TagResolver API and its builder implementation, then review how tags, Key values, ArgumentQueue, and Context are currently represented. Compare those entry points with the proposed NamespacedBuilder, and consider the work complete when multiple namespaces can safely contribute tags through the documented API.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.