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
Copy file name to clipboardExpand all lines: README.md
+64-5Lines changed: 64 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,16 +159,21 @@ Allows a short same-IP reconnect grace period after a verified player disconnect
159
159
auth.showJoinFeedback = true
160
160
```
161
161
162
-
Show join feedback Title/chat messages for premium, skin-site, offline fallback, and single-player states. Set to `false` to silence those messages without changing authentication or skin refresh behavior.
162
+
Show the join feedback chat message for premium, skin-site, offline fallback, and single-player states. Set to `false` to silence it without changing authentication or skin refresh behavior.
163
+
164
+
```toml
165
+
auth.showJoinTitle = false
166
+
```
167
+
168
+
Additionally show a full-screen title/subtitle on join. Off by default, because the persistent account-status overlay below already reports the same state without interrupting the screen. Set to `true` to restore the old title behavior.
163
169
164
170
```toml
165
171
auth.showAccountOverlay = true
166
172
```
167
173
168
-
Shows a small top-left client badge after a TrueUUID handshake. Green means
169
-
premium verified; red means the server accepted its configured offline
170
-
fallback. It is client-local and only appears after a TrueUUID-enabled server
171
-
has responded.
174
+
Shows a small client-side badge after a TrueUUID handshake: green `Premium` or
175
+
red `Offline`, drawn as plain corner text with no backdrop. It is client-local
176
+
and only appears after a TrueUUID-enabled server has responded.
172
177
173
178
Default feedback and disconnect messages are sent as Minecraft translation keys and rendered by the player's client language files (`en_us` / `zh_cn`). If you previously generated a config with custom bilingual strings, change those message values back to `trueuuid.*` keys or regenerate the config to use client-side localization.
Allowlist for Yggdrasil/authlib-injector `hasJoined` hosts. An empty list rejects all client-reported endpoints and keeps Mojang as the safe default. Add an exact host such as `"littleskin.cn"`, or an explicit wildcard such as `"*.example.com"`. Custom endpoints must pass HTTPS/443, path, DNS/IP, response-size, timeout, and no-redirect checks.
192
197
198
+
The account-status badge position is configurable:
199
+
200
+
```toml
201
+
auth.overlayCorner = "bottom_right"
202
+
auth.overlayOffsetX = 0
203
+
auth.overlayOffsetY = 0
204
+
auth.overlayScale = 1.25
205
+
```
206
+
207
+
`overlayCorner` accepts `top_left`, `top_right`, `bottom_left`, or `bottom_right`.
208
+
`bottom_right` is the default because vanilla keeps status effects and
209
+
advancement toasts in the top right, chat in the bottom left, and other mods
210
+
commonly claim the top left. The offsets nudge the badge by that many pixels
211
+
(positive = right/down) if it still collides with another mod's HUD.
212
+
`overlayScale` sizes the padlock and label together; whole numbers (`1.0`, `2.0`)
213
+
keep Minecraft's bitmap font perfectly crisp, values in between are slightly soft.
214
+
215
+
These options behave identically on every supported target.
216
+
217
+
## Addon API
218
+
219
+
TrueUUID exposes a small server-side API (`cn.alini.trueuuid.api`) so other mods
220
+
can branch on whether an online player authenticated as premium or through
221
+
offline fallback — for example, sending offline players to a separate spawn.
222
+
223
+
`AccountStatus` is one of `PREMIUM_VERIFIED`, `ONLINE_MODE`, `OFFLINE_FALLBACK`,
224
+
or `UNKNOWN` (with `isPremium()` / `isOffline()` helpers).
225
+
226
+
Query a player's status at any time while they are online:
227
+
228
+
```java
229
+
importcn.alini.trueuuid.api.TrueuuidApi;
230
+
importcn.alini.trueuuid.api.AccountStatus;
231
+
232
+
AccountStatus status =TrueuuidApi.getStatus(serverPlayer);
233
+
if (status.isOffline()) {
234
+
// e.g. restrict permissions, or teleport to an offline-only world
235
+
}
236
+
```
237
+
238
+
Or register a callback fired on the server thread the moment a player's status
239
+
is known at join (register once during your mod's setup):
@@ -93,6 +101,16 @@ public static final class Common {
93
101
.define("showJoinFeedback", true);
94
102
showAccountOverlay = b.comment("Show a small client account-status overlay after a TrueUUID login handshake. / 在 TrueUUID 登录握手后显示小型客户端账号状态覆盖层。")
95
103
.define("showAccountOverlay", true);
104
+
// Keep these identical to the modern Forge line (platform/forge-common)
105
+
// so the badge behaves the same on every supported target.
106
+
overlayCorner = b.comment("Screen corner for the account-status badge: top_left, top_right, bottom_left, bottom_right. Default bottom_right: vanilla keeps status effects and advancement toasts in the top right, chat in the bottom left, and mods commonly take the top left. / 账号状态角标所在屏幕角落。默认 bottom_right。")
overlayOffsetX = b.comment("Extra horizontal pixels for the badge, to dodge another mod's HUD. Positive moves right. / 角标水平像素偏移,正值向右。")
109
+
.defineInRange("overlayOffsetX", 0, -4096, 4096);
110
+
overlayOffsetY = b.comment("Extra vertical pixels for the badge, to dodge another mod's HUD. Positive moves down. / 角标垂直像素偏移,正值向下。")
111
+
.defineInRange("overlayOffsetY", 0, -4096, 4096);
112
+
overlayScale = b.comment("Size of the account-status badge, scaling the padlock and label together. Whole numbers (1.0, 2.0) keep the bitmap font crisp. / 账号状态角标缩放,整数值字体最清晰。")
113
+
.defineInRange("overlayScale", 1.0D, 0.5D, 4.0D);
96
114
97
115
// 策略项 (Strategy items)
98
116
knownPremiumDenyOffline = b.comment("Once a name has been verified as premium/skin-site, deny later offline fallback for that name. / 一旦该名字成功验证过正版或皮肤站,后续鉴权失败时禁止以离线身份进入。")
Copy file name to clipboardExpand all lines: platform/forge-1.20.1/src/main/resources/assets/trueuuid/lang/en_us.json
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,8 @@
10
10
"trueuuid.chat.offline_fallback": "Notice: You joined in Offline Mode. If you own a premium account, verification may have failed because of network issues. Please relog and try again. If you continue playing, player data may need migration after a later successful verification.",
0 commit comments