VaultTickets¶
Decides how many AxVaults vault pages each player gets on main, from their donor rank plus any
vault tickets they redeemed. It keeps those pages correct as ranks are bought, upgraded, or lapse.
What it does¶
- Reads two sources and adds them together:
- Rank floor. A donor rank holds one
vaulttickets.floor.<n>node. Floors are held, not owned: if a player has several, the highest counts, and it goes away when the rank does. - Extras. Each redeemed Vault Expansion Ticket (from the
skinticketsmod) is owned. Extras add up and survive any rank change. - Works out
pages = min(max-pages, highest floor + sum of extras). - Writes the result to LuckPerms as user nodes
axvaults.vault.1up toaxvaults.vault.N. AxVaults reads those nodes to decide which pages open. - Makes "no rank and no tickets" mean zero pages. AxVaults ships
axvaults.vault.1as free-for-everyone inside its own jar, and no config file can change that. This plugin turns that default off when it starts. - Re-checks a player on join, about one second after LuckPerms reports their permissions changed,
right after they redeem a ticket, and when staff run
/vaulttickets sync. If nothing would change, it writes nothing.
Example: a rank 2 player (floor 2) who redeemed 3 tickets gets 5 pages.
How players use it¶
- Get pages by buying a donor rank, by redeeming Vault Expansion Tickets, or both.
- To redeem a ticket, hold it and right-click. The
skinticketsmod handles the ticket. This plugin then adds the page within a moment. - Open the vault with
/vault(or/vaults). Each page has 54 slots.
A rank adds on top of tickets. One ticket plus rank 2 is three pages, not two. If a rank lapses, the rank pages go away but ticket pages stay.
Staff guide¶
All commands need vaulttickets.admin (ops by default). Alias: /vtickets. Console works.
| Task | Command |
|---|---|
| See a player's floor, owned tickets, entitled total and granted pages | /vaulttickets info Steve |
| Re-read their tickets from the database and fix their pages | /vaulttickets sync Steve |
| Re-run the startup checks (free pages, bad rank grants, AxVaults cap) | /vaulttickets audit |
| Remove leftover "denied page" nodes from older versions | /vaulttickets prune |
info and sync only work for players who have joined at least once.
Give a rank vault pages. Give the rank group one floor node. Set it to the total pages that rank should have alone, not an increase:
/lp group rank1 permission set vaulttickets.floor.1 true
/lp group rank2 permission set vaulttickets.floor.2 true
/lp group rank3 permission set vaulttickets.floor.3 true
A rank 3 player who also inherits rank1 and rank2 gets 3, not 6.
Never grant axvaults.vault.N to a group. LuckPerms merges group nodes with this plugin's
nodes instead of adding them. A rank 2 player with 3 tickets would get 3 pages instead of 5, with
no error. The startup audit warns about any group that does this. Replace it with a floor node.
Give pages without a rank. Use the skintickets commands, for example
/skinticket givevault Steve 1 (a ticket item) or /skinticket addvault Steve 1 (straight to their
count). Then this plugin updates their pages.
Do not hand-edit axvaults.vault.N user nodes. This plugin owns them and rewrites them on every
check. User-level axvaults.vault.N false rows from older versions are this plugin's old output,
not a rule someone set; clear them with /vaulttickets prune.
Testing. Test as a non-op. Ops have every permission and will see every page.
Configuration¶
plugins/VaultTickets/config.yml. There is no reload command, so a change goes live on the next
server restart.
| Key | Default | What it is for |
|---|---|---|
zero-pages-by-default |
true |
Turn off AxVaults' free page 1. Set false to give everyone one free page again |
deny-unearned-pages |
false |
Also write a false node for every page not earned. Only useful when a page is granted somewhere this plugin cannot remove (a group, a wildcard, another plugin). Fix that grant instead |
max-pages |
13 |
Cap on total pages. It is the ticket cap (10) plus the highest rank floor (3) |
rank-floor-permission-prefix |
vaulttickets.floor. |
The floor node ladder |
vault-permission-prefix |
axvaults.vault. |
What AxVaults reads. Change only if AxVaults changes |
reconcile-on-permission-change |
true |
Update pages about a second after a rank change while the player is online. false means on join only |
check-axvaults-config |
true |
Warn at boot if AxVaults' cap is lower than max-pages |
Rules that must stay true:
max-pagesis not the ticket cap. Theskinticketssettingexpansions.max-vault-tabsstays 10. The gap between 10 and 13 is the rank benefit. At the old value of 10, a player with every ticket got nothing from buying a rank.- AxVaults'
max-vault-amountmust be at leastmax-pages. If it is lower, players get pages they cannot open. - AxVaults must run
permission-mode: 0, where each page needs its own node. - After switching
deny-unearned-pagesfrom on to off, run/vaulttickets pruneonce.
Data and storage¶
This plugin has no files or tables of its own.
- Ticket counts live in the
skinticketsdatabase, tableskin_ticket_expansions, columnvault_tabs. This plugin reads them through the mod's own connection pool, so it opens no new database connections. - Page grants are LuckPerms user nodes
axvaults.vault.1..N. They are rebuilt on every check, so they are safe to lose: the next join puts them back. - Floors are LuckPerms group nodes
vaulttickets.floor.<n>that staff set. - The vault contents themselves belong to AxVaults.
Troubleshooting¶
| Symptom | Cause | Fix |
|---|---|---|
| Everyone can open page 1 | The free-page default is still on | Run /vaulttickets audit. If it lists axvaults.vault.1, run /lp group default permission set axvaults.vault.1 false and report it |
| A ranked player with tickets has too few pages | A group grants axvaults.vault.N directly |
/vaulttickets audit names the group. Replace the grant with a floor node |
| A page is granted but will not open | AxVaults max-vault-amount is below max-pages |
Raise AxVaults' cap to match |
| Rank bought but page count did not move | The player was already at max-pages |
Check /vaulttickets info <player> |
| Player redeemed a ticket but has no new page | Their data did not update | /vaulttickets sync <player> |
| Vault ticket says it cannot be redeemed here | This plugin is not loaded on that server | Install it, or redeem on main |
info says pages are not being lowered while the owned count is unknown |
The ticket database could not be read | Pages are only ever raised until it can. Check the skintickets database |
Boot log lines when it is working:
[VaultTickets]: No free vault pages: took the default grant off axvaults.vault.1 ...
[VaultTickets]: Vault entitlements active: floor node vaulttickets.floor.1...vaulttickets.floor.13, granting axvaults.vault.N
There should be no WARN lines from VaultTickets after them. If the second line ends in
(ranks only; ticket bridge unavailable), the skintickets mod is too old (it needs 2.1.0 or
later). Rank pages still work then, and no one loses a page they already have.
If LuckPerms is missing, the plugin logs LuckPerms is not loaded; vault pages cannot be granted.
Disabling. and turns itself off.
Maintainer notes¶
- Why a plugin and not part of the mod. AxVaults reads Bukkit permissions, and a NeoForge mod
cannot reach Bukkit or LuckPerms. On Youer a Bukkit plugin can load mod classes, but not the
other way round. So the mod declares
VaultTabBridgeandVaultTabs.register(...), and this plugin registers itself when it starts. The mod then calls back into it. - No bridge means refusal, not loss. Without this plugin, the mod refuses vault redemption and keeps the ticket. That stops a ticket being used up on a server with no AxVaults.
- Login heals drift. Pages are rebuilt on every join, so a write that failed after the database commit costs nobody a page. Writes clear the namespace and re-add, so they are safe to repeat.
- Skipped no-op writes matter. Writing the same nodes again would fire LuckPerms' recalculate event, which would trigger another check, forever.
- Unknown never lowers. If
skinticketsis missing or its database is down, extras are unknown. The plugin then only raises pages, never lowers them, and stays enabled. - Group grants are reported, not fought. The plugin owns only the user level of
axvaults.vault.*and can only take back what it wrote. - Free-page suppression runs twice: at enable and again one tick later, in case AxVaults
registers its permissions late. With
deny-unearned-pagesoff, that suppression is the only thing closing page 1, so the audit re-checks it and the plugin warns the first time a player can open a page they did not earn. - The main class names no
skinticketstype. Every mod reference sits inSkinTicketsBridge, reached throughVaultProjection. Naming a mod type in the plugin class made 1.0.0 fail at class load withNoClassDefFoundError, before any try/catch could run. - The floor plus extras rule is the same one
pixelmonbridgeuses for PC boxes and Day Care slots andpixelmongtsuses for listing limits. It is a deliberate copy, not a shared library; seeVaultResolver. - 1.2.0 stopped writing a
falsenode for every unearned page (it was 13 rows per player in LuckPerms). A node now exists only for a page that is unlocked. - Ops docs:
documentation/plugins/axvaults-vault-tickets.mdin the ops repo. - Small bug:
/vaulttickets prunesays "Turn it off and reload" whendeny-unearned-pagesis on. There is no reload command; a restart is needed.
Building¶
./gradlew build
Java 21. Output: build/libs/VaultTickets-1.2.0.jar. Runs 40 unit tests on the floor and extras
math.
It compiles against the real skintickets mod jar at
../../Mods/skintickets/build/libs/skintickets-2.2.0.jar, so build that mod first. Jars are
byte-reproducible, so a pinned sha256 identifies the build, not just one file.
Full command, permission and config tables: Reference.