
MC-Banking
This adds a banking system to minecraft with support for the Minecraft Transit Railways Mod, Includes ATM'S a management computer. Debit cards, Cash, Business Accounts. As well as an API to link other mods to it for purchases and other things!
Список изменений
MC-Banking v5.7.1 Changelog
API — Dollar-Based Amounts
All API methods now accept double dollar amounts (e.g. 5.00, 25.50)
Internally converts to cents using Math.round(dollars * 100.0)
Old long cents methods still work but are marked @deprecated
New getBalance() and getSavings() return dollars as double
Added getBalanceCents() and getSavingsCents() for raw internal values
Added getCashInInventoryDollars() and takeCashFromInventoryDollars() dollar overloads
API — Debit Card Account Resolution
charge(player, ...), chargeByCard(...), chargeFlexible(...), and chargeFlexibleByCard(...) now resolve the account from the player's held debit card (main hand → off hand → inventory → fallback)
External mods automatically charge the correct bank account without needing to specify which one
API — Cheque Cashing
Added cashCheque(player, chequeStack) — cash a specific cheque ItemStack
Added cashFirstCheque(player) — find and cash first valid cheque in inventory, removes on success
Added cashChequeAtSlot(player, slot) — cash cheque at specific slot, removes on success
All return null on success or an error string on failure
API — Business Card Dollar Overload
Added chargeBusinessCard(uuid, double amount, description)
Added chargeBusinessCard(player, double amount, description)
BankAccountManager Fix
Fixed getOrCreate(uuid) — when called without a bank name, now reliably finds any existing account instead of potentially creating a phantom ACC- account with $0
Usage Example
BankingAPI api = BankingAPI.getInstance(); api.charge(player, 25.50, "MC-Economy", "Land purchase: plot-42"); api.deposit(player, 100.0, "MyMod", "Quest reward"); double balance = api.getBalance(player.getUuid()); String err = api.cashFirstCheque(player);
