Commit ea1e438
Add item, escaping and hover support to XPrisonTextAPI
Migrating the addons off Adventure surfaced three gaps the String-only surface
could not cover:
- applyDisplayName / applyLore: ItemMeta#displayName(Component) and #lore(List)
name Adventure types in their descriptors, which is enough on its own to stop
the calling class loading on a server without Adventure. Every addon that
builds GUI items hit this.
- escapeTags: the Discord addon escapes MiniMessage tags in relayed chat so a
player cannot inject a working click or hover tag. Dropping it during the
migration would have turned a fixed injection into a live one.
Item hovers are expressed as a <hover:show_item:...> tag in the message string
rather than needing a component-placeholder API, which keeps the surface
String-only and degrades correctly where hover cannot be sent.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bdb6qa8CXKgSedjZAGuavL1 parent ea50ab3 commit ea1e438
1 file changed
Lines changed: 38 additions & 0 deletions
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
67 | 105 | | |
68 | 106 | | |
69 | 107 | | |
| |||
0 commit comments