-
Notifications
You must be signed in to change notification settings - Fork 1
BankManager
Wenox edited this page Oct 9, 2025
·
1 revision
The BankManager class manages player bank accounts, loans, merits, and transaction histories within the SkyblockCore plugin. It provides static methods to add, reduce, and retrieve bank money and loans, manage loan merits, and track transaction logs.
- Manage player bank money balance.
- Handle loan amounts and loan merits.
- Track loan time and interest tasks.
- Maintain transaction history for deposits, withdrawals, loans, and repayments.
- Automatically schedule interest tasks for players with bank money.
To use BankManager from another plugin:
-
Add dependency in your
plugin.yml:depend: [SkyblockCore] -
Import the class:
use Biswajit\Core\Managers\BankManager; use Biswajit\Core\Player;
-
Call static methods directly, passing
Playerinstances.
- Player instances must be of type
Biswajit\Core\Player. - Interest tasks are scheduled automatically when bank money is added.
- Transactions are stored as JSON-encoded arrays in player economy data.
- Recovering loans currently resets bank and economy money to zero; player punishment is a TODO.
// Get bank money
$balance = BankManager::getBankMoney($player);
// Add money to bank
BankManager::addBankMoney($player, 100.0);
// Reduce bank money
BankManager::reduceBankMoney($player, 50.0);
// Get loan amount
$loan = BankManager::getLoan($player);
// Add loan
BankManager::addLoan($player, 200.0);
// Pay loan
BankManager::reduceLoan($player, 100.0);
// Get transaction history
$transactions = BankManager::getTransactions($player);- Package:
Biswajit\Core\Managers - Author: Biswajit
- Version: 1.0.0
For support with the SkyblockCore, you can join our Discord.
Copyright © 2025 PixelForge-Studios