This commit is contained in:
5vl 2021-02-24 20:04:45 +01:00
parent 78f509fdbd
commit f585f1de19
2 changed files with 8 additions and 5 deletions

View File

@ -21,15 +21,18 @@ public class InvClick extends chatcolors implements Listener {
public void InventoryClick(InventoryClickEvent e) {
Player p = (Player) e.getWhoClicked();
if (currentGui.get(p.getUniqueId()).equalsIgnoreCase("bankerMain")) {
if (e.getRawSlot() == 13) {
if (e.getSlot() == 11) {
p.closeInventory();
}
if (e.getSlot() == 13) {
p.openInventory(bankerWithdraw.getGui());
p.closeInventory();
currentGui.put(p.getUniqueId(), "bankerWithdraw");
}
e.setCancelled(true);
}
if (currentGui.get(p.getUniqueId()).equalsIgnoreCase("bankerWithdraw")) {
if (e.getRawSlot() == 13) {
if (e.getSlot() == 13) {
int bankBal;
int purseBal;
try {

View File

@ -51,11 +51,11 @@ public class bankerMain extends chatcolors {
depositMeta = deposit.getItemMeta();
depositMeta.setDisplayName(color("&aDeposit"));
depositLore.add(color("&7Total money: &6" + totalBal));
withdrawMeta.setLore(depositLore);
withdraw.setItemMeta(depositMeta);
depositMeta.setLore(depositLore);
deposit.setItemMeta(depositMeta);
// Glass panes
glass = new ItemStack(Material.GRAY_STAINED_GLASS_PANE);
glass = new ItemStack(Material.LIGHT_GRAY_STAINED_GLASS_PANE);
glassMeta = glass.getItemMeta();
glassMeta.setDisplayName(" ");
glass.setItemMeta(glassMeta);