Commit ef04874
committed
fix: migrate pin feature + e2e fixtures to BanManager v8 placeholder syntax
BanManager v8 dropped legacy [token] placeholders in favour of MiniMessage
<token> tags, and rejects messages containing legacy & colour codes outright.
Without this migration the pin feature silently no-ops and every e2e ban /
tempban kick test sees the unsubstituted "<pin>" template (or, after rejection,
the bundled defaults that have no pin placeholder at all).
- CommonPlayerDeniedListener: detect <pin> via Message.getRawTemplate() (the
resolved string is a Component-backed legacy render and never contains the
raw template token after v8). Bail when the template has no <pin>.
- Bundled common/src/main/resources/messages.yml: rewrite pin.notify /
pin.pin / pin.rateLimited in MiniMessage format with <pin>, <expires>,
<seconds>.
- e2e fixtures (bukkit / bungee / fabric / sponge / velocity):
- banmanager-webenhancer/messages.yml: same MiniMessage rewrite.
- banmanager/messages.yml: shrink from a full clone of the legacy
messages.yml to a minimal MiniMessage override of just ban / tempban /
banip / tempbanip kick + disallowed templates so the WebEnhancer pin
feature has a <pin> token to substitute. Everything else falls through
to BanManager v8's bundled defaults.
- Update CommonPlayerDeniedListenerTest to mock getRawTemplate() and add a
null-template case.1 parent 56204f3 commit ef04874
13 files changed
Lines changed: 117 additions & 1954 deletions
File tree
- common/src
- main
- java/me/confuser/banmanager/webenhancer/common/listeners
- resources
- test/java/me/confuser/banmanager/webenhancer/common/listeners
- e2e/platforms
- bukkit/configs
- banmanager-webenhancer
- banmanager
- bungee/configs
- banmanager-webenhancer
- banmanager
- fabric/configs
- banmanager-webenhancer
- banmanager
- sponge/configs
- banmanager-webenhancer
- banmanager
- velocity/configs
- banmanager-webenhancer
- banmanager
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 14 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | 45 | | |
48 | | - | |
| 46 | + | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
| |||
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
57 | | - | |
58 | 55 | | |
59 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
| |||
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
69 | | - | |
70 | 77 | | |
71 | 78 | | |
72 | | - | |
73 | 79 | | |
74 | | - | |
| 80 | + | |
75 | 81 | | |
76 | 82 | | |
77 | 83 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments