Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/ProvinceSystem/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Schema assets: [assets/map-export-schema.json](assets/map-export-schema.json) (S
## Shared platform behavior

- **Name:** TFMC = TF Minecraft. "TF" has no expansion.
- **Website sign-in** - Discord OAuth powers account and staff pages. Skins, drinks, and characters also use TFMCWeb-issued UUID-bound codes; redeem → feature API session (8h default; character Remember me = 30d).
- **Website sign-in** - Discord OAuth powers account and staff pages. Skins, drinks, and characters also use TFMCWeb-issued UUID-bound codes; redeem → feature API session (8h).
- **Shared cosmetic mint cooldown** - skin + drink share one clock on **TFMCWeb** (not ProvinceSystem).
- **Discord link** - in-game `/linkdiscord` + Discord `/linkdiscord <code>`; required before upload.
- **SQLite + disk** for skins/drinks metadata and pending files on the API.
Expand Down
4 changes: 2 additions & 2 deletions projects/ProvinceSystem/docs/characters/creator.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Donators (and later all players) create and manage RP characters on the website
|----------|--------|
| Proof of account | In-game `/token create profile` (UUID-bound, Discord-eligible); redeem at `/profile` |
| Code lifetime | Consumed **on redeem** |
| After redeem | API **session** Bearer - default **8h**; Remember me **30d** |
| Storage | sessionStorage if not remembered; localStorage if Remember me |
| After redeem | API **session** Bearer - **8h** (the site offers no Remember me) |
| Storage | sessionStorage |
| Website accounts | **None** |

### Attribute point-buy
Expand Down
2 changes: 1 addition & 1 deletion projects/ProvinceSystem/docs/identity/auth-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ their views and their Profile sessions; the role change or revocation is the aud
|---------|-----------|
| Player redeem (skins / drinks / profile) | `POST …/redeem` with code → short-lived **opaque** session token stored in SQLite; client sends `Authorization: Bearer <token>` |
| Session scope | Encoded in DB row (`skin`, `skin_staff`, `drink`, `profile`) |
| TTL | Default **8h** after redeem; profile Remember me **30d** |
| TTL | **8h** after redeem. The API still accepts `remember_me` (30 days) for profile, but the site never sends it |
| Profile / map staff | `profile` scope session from `/profile` redeem or a linked Discord account ([Profile without a code](#profile-without-a-code)); carries `player_uuid` and `realm_id` for permission checks |
| No website passwords | Codes are UUID-bound and not shareable by design |

Expand Down
2 changes: 1 addition & 1 deletion projects/ProvinceSystem/docs/identity/tfmcweb.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Rules:

- Must be Discord-linked and not past grace (Survival players).
- Codes bound to UUID.
- Session TTL: default **8h** after redeem; Remember me **30d** for profile.
- Session TTL: **8h** after redeem.
- Codes consumed on submit (skin/drink) or redeem (profile).
- **Shared mint cooldown (`skin` + `drink`):** owned by **TFMCWeb** only. Profile is not in the shared family.
- **Command gate:** LP `tfmcweb.token.create`; staff perm `tfmcweb.token.create.staff`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ TFMCWeb is the bridge between the Minecraft server and the ProvinceSystem websit

1. Type `/linkdiscord` in game. The plugin asks the website API for a code and prints a **click-to-copy** code in chat, plus "In Discord, run `/linkdiscord <code>` with that code" and a relative expiry line.
2. Run `/linkdiscord <code>` in the Discord server. Within **~1 second** the in-game plugin picks up the `link_success` notice and chats "Discord linked successfully with `<discord name>`", and the Survival Discord gate is lifted through RPCharacters.
3. Type `/token create profile` to get a profile code; redeem it on the website `/profile` page ("optional Remember me keeps you signed in **30 days**").
3. Type `/token create profile` to get a profile code; redeem it on the website `/profile` page. The session lasts **8 hours**.
4. Type `/token create skin` or `/token create drink` to get a cosmetic upload code; redeem on the skins website or the website `/drinks` page. **Both draw from one shared mint cooldown**, so using one blocks the other. The plugin replies "Token cooldown: try again in 3d 4h" if you are still waiting.
5. `/unlinkdiscord` removes the link and **re-applies the Survival gate**.
6. On every join the plugin silently pushes your rank tier, name-colour stops, max alive characters, wardrobe skin slots, allowed skin kinds and drink permissions to the website, so what you can do on the site matches your in-game rank.
Expand Down Expand Up @@ -564,7 +564,7 @@ TFMCWeb is the bridge between the Minecraft server and the ProvinceSystem websit

- **Notice poll interval: 1 second** — this is how fast a Discord link appears in game (`managers\PluginNoticePoller.java`).
- **Shared skin+drink mint cooldown by rank** (`TFMCWeb\config.yml`, `token-cooldowns`): default **−1 = cannot mint**; `rpchar.group.noble` **28 days**, `gilded` **21 days**, `ascended` **14 days**, `legacy` **7 days**. Highest matching permission wins. Remaining time is displayed rounded to `Xd Yh`, minimum "1h".
- **Website "Remember me" session: 30 days.**
- **Website code session: 8 hours.**
- **RPCharacters entitlements** (`player-meta.rpc`): max alive characters **3** default → noble 3, gilded **4**, ascended/legacy **5**; wardrobe skin slots **1** default → gilded 2, ascended/legacy 3; name-colour stops **0** default → noble 1, gilded 2, ascended/legacy **20**.
- **Skin entitlements** (`player-meta.skins`): max 3D pair size **30720 bytes (30 KB)**; skin kinds unlocked by tier — noble: handheld / large_handheld / bow / large_bow / crossbow / book; gilded: armor_set; ascended: item_3d / shield / helmet_3d / gun. `allow-armor-3d-helmet` from ascended up.
- **Drink entitlements** (`player-meta.drinks`): drink textures from gilded up; custom drink messages from ascended up; name-colour stops 0/1/2/8/8 by tier.
Expand Down