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) { public void InventoryClick(InventoryClickEvent e) {
Player p = (Player) e.getWhoClicked(); Player p = (Player) e.getWhoClicked();
if (currentGui.get(p.getUniqueId()).equalsIgnoreCase("bankerMain")) { if (currentGui.get(p.getUniqueId()).equalsIgnoreCase("bankerMain")) {
if (e.getRawSlot() == 13) { if (e.getSlot() == 11) {
p.closeInventory(); p.closeInventory();
}
if (e.getSlot() == 13) {
p.openInventory(bankerWithdraw.getGui()); p.openInventory(bankerWithdraw.getGui());
p.closeInventory();
currentGui.put(p.getUniqueId(), "bankerWithdraw"); currentGui.put(p.getUniqueId(), "bankerWithdraw");
} }
e.setCancelled(true); e.setCancelled(true);
} }
if (currentGui.get(p.getUniqueId()).equalsIgnoreCase("bankerWithdraw")) { if (currentGui.get(p.getUniqueId()).equalsIgnoreCase("bankerWithdraw")) {
if (e.getRawSlot() == 13) { if (e.getSlot() == 13) {
int bankBal; int bankBal;
int purseBal; int purseBal;
try { try {

View File

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