package org.poopki.duckdns.user_db.GUI; import dev.lone.itemsadder.api.CustomStack; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.Inventory; import org.poopki.duckdns.user_db.Array.AccountArray; import org.poopki.duckdns.user_db.Array.FarmArray; import org.poopki.duckdns.user_db.Array.NationArray; import org.poopki.duckdns.user_db.Array.SquadArray; import org.poopki.duckdns.user_db.UserInfoArray; import org.bukkit.inventory.ItemStack; import java.util.UUID; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.commons.lang.StringEscapeUtils; import java.util.stream.Stream; public class AccountGUI implements Listener{ private final Inventory inv; UUID m_uuid; ItemManager m_ItemManager = new ItemManager(); AccountArray m_AA; UserInfoArray m_UIA; FarmArray m_FA; NationArray m_NA; SquadArray m_SA; public AccountGUI(AccountArray AA, UserInfoArray UIA, FarmArray FA, NationArray NA, SquadArray SA, UUID uuid, InventoryClickEvent e) { m_uuid=uuid; this.inv = Bukkit.createInventory(null,54,":offset_-8::bank_main:"); m_AA = AA; m_UIA = UIA; m_FA = FA; m_NA = NA; m_SA = SA; initItemSetting(); } private void initItemSetting() { /* inv.setItem(0,m_ItemManager.GetBalance(m_AA, m_UIA, m_FA, m_NA,m_SA,m_uuid, "User")); inv.setItem(1,m_ItemManager.GetBalance(m_AA, m_UIA, m_FA, m_NA,m_SA,m_uuid, "Nation")); inv.setItem(2,m_ItemManager.GetBalance(m_AA, m_UIA, m_FA, m_NA,m_SA,m_uuid, "Farm")); inv.setItem(9, m_ItemManager.btn1); inv.setItem(18, m_ItemManager.btn2); inv.setItem(10, m_ItemManager.btn3); inv.setItem(19, m_ItemManager.btn4); inv.setItem(11, m_ItemManager.btn5); inv.setItem(20, m_ItemManager.btn6); CustomStack stack = CustomStack.getInstance("digits:digit-zero"); ItemStack itemStack = stack.getItemStack(); */ List strList = new ArrayList(); String before = String.valueOf(m_AA.getAccountInfo(m_uuid)); strList.addAll(Arrays.asList(before.split(""))); int tmp = strList.size(); for(int i=0; i<8-tmp; i++) { strList.add(0, "0"); } for(int i = 0; i