oniria_economy-1.0.2.jar
Curse Maven Snippet
What's new
English
✨ Added
- Direct FTBRanks API integration (optional dependency, no compile-time coupling).
- New
FtbRanksIntegrationclass that talks to the FTBRanks API (MC 1.21.1 / v2101.x) via reflection: the mod still compiles and starts even when FTBRanks is absent. - Rank granting and removal are now performed directly through the API (
Rank.add/Rank.remove) instead of text commands (ftbranks add/remove). - Immediate persistence of the
players.snbtfile after every grant/removal (forcedsavePlayersNow()call), removing the write latency caused by FTBRanks' deferred auto-save. - Declared FTBRanks as an optional dependency in
neoforge.mods.toml(ordering = AFTER) to guarantee runtime detection.
- New
- Minutes display in the remaining time of rank subscriptions (shop, "Subscriptions" tab).
- Format
1d 23h 5m, with clean omission of leading zero units (e.g.23h 5m,5m) and anExpiredlabel when the subscription has run out.
- Format
🐛 Fixed
- False "You already own this rank" message when buying a rank the player does not actually own.
- The purchase check now relies on an exact in-memory verification through the FTBRanks API (
Rank.isAdded) instead of approximateplayers.snbtfile parsing. - Detection no longer confuses a rank with another one whose name contains it (e.g.
vipno longer falsely triggers onvip_plus).
- The purchase check now relies on an exact in-memory verification through the FTBRanks API (
- Slow
players.snbtupdates after a rank purchase/expiration: resolved by the forced immediate persistence (see Added). - Hardened fallback
players.snbtparsing: used only when the FTBRanks API is unavailable, it now performs an exact, case-insensitive rank-name match (no more substring false positives). - "Subscriptions" tab: the button used to show a generic "expires soon" text; it now shows the real countdown (days / hours / minutes).
🔁 Behavior changes
- Rank purchase/removal cleanly disabled when FTBRanks is absent.
- On purchase: clear message ("Rank purchase is unavailable: FTBRanks is not installed") and no OniriaCoins are charged.
- On expiration: removal is skipped and logged (
SKIPPED / ftbranks_unavailable) instead of running a no-op command.
🧹 Internal cleanup
- Removed the now-unused
scheduleFtbranksReloadmethod (theftbranks reloadstep is no longer needed with the API integration). - Stronger grant safety: if the FTBRanks API fails to grant the rank (rank not found, etc.), the purchase is aborted and reported to the player.
-------------------------------------------------------------------------
Français
✨ Ajouts
- Intégration directe de l'API FTBRanks (soft-dependency par réflexion) : attribution/retrait de rank via l'API, avec persistance immédiate de
players.snbt; FTBRanks déclaré optionnel dansneoforge.mods.toml. - Affichage des minutes dans le temps restant des abonnements : format
1j 23h 5m(avecExpirési écoulé).
🐛 Corrections
- Faux « Tu possèdes déjà le rank » : check exact en mémoire (
isAdded) au lieu du parsing fragile → fini la confusionvip↔vip_plus. - Lenteur de
players.snbt: résolue par la sauvegarde forcée immédiate. - Fallback fichier durci (match exact, insensible à la casse).
- Onglet « Abonnements » : le bouton affiche le vrai compte à rebours au lieu de « expire bientôt ».
🔁 Comportement
- Achat/retrait de rank désactivé proprement si FTBRanks absent (message clair, aucun débit).
🧹 Interne
- Suppression de
scheduleFtbranksReload(obsolète) ; échec d'attribution → achat interrompu et signalé.
This mod has no additional files

