Skip to content

Instantly share code, notes, and snippets.

@test414EFF
Created March 20, 2020 21:22
Show Gist options
  • Save test414EFF/fd68829ab058add44941881627b6eeba to your computer and use it in GitHub Desktop.
Save test414EFF/fd68829ab058add44941881627b6eeba to your computer and use it in GitHub Desktop.
This is only the relevant method for opening the account selector
public void accountSelectorGUI(Player p) {
Inventory gui = utility.createGUI(p, "Your Bank Accounts", 9);
int checkingSlot = 1;
for(String accUUID : accountStorage.getAccountList("player", p.getDisplayName(), "checkingAccounts")) {
utility.addItem(gui, checkingSlot, Material.EMERALD, "Checking Account", "§7Balance: §f" + accountStorage.getAccountBalance(accUUID) + ";§7Creation Date: §f" + accountStorage.getAccountDOC(accUUID) + "; ;" + accUUID);
checkingSlot++;
}
int savingsSlot = 5;
for(String accUUID : accountStorage.getAccountList("player", p.getDisplayName(), "savingsAccounts")) {
utility.addItem(gui, savingsSlot, Material.EMERALD_BLOCK, "Savings Account", "§7Balance: §f" + accountStorage.getAccountBalance(accUUID) + ";§7Creation Date: §f" + accountStorage.getAccountDOC(accUUID) + "; ;" + accUUID);
savingsSlot++;
}
p.openInventory(gui);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment