Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player.openInventory(inventory); // Ошибка в этой строке
- openPINRegistration(player); // И в этой
- //------------------------------------------------------------------
- // Метод openPINRegistration:
- public void openPINRegistration(Player player) {
- player.closeInventory();
- inputedPIN.put(player, "xxxx");
- Inventory inventory = Bukkit.createInventory(null, 27, "PINAuth - Регистрация");
- ItemStack deco = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 7);
- ItemStack pinInfo = new ItemStack(Material.PAPER); {
- ItemMeta meta = pinInfo.getItemMeta();
- meta.setDisplayName("Информация");
- List<String> lore = new ArrayList<String>();
- lore.add("Введенный PIN-код: " + inputedPIN.get(player));
- meta.setLore(lore);
- pinInfo.setItemMeta(meta);
- }
- for(int i = 0; i < 9; i++) {
- inventory.setItem(i, deco);
- }
- for(int i = 17; i < 27; i++) {
- inventory.setItem(i, deco);
- }
- inventory.setItem(9, deco);
- inventory.setItem(11, deco);
- inventory.setItem(15, deco);
- inventory.setItem(17, deco);
- inventory.setItem(10, pinInfo);
- inventory.setItem(16, deco);
- for(int i = 3, j = 1; i < 6 && j < 4; i++, j++) {
- ItemStack pinButton = new ItemStack(Material.IRON_BLOCK, j); {
- ItemMeta meta = pinButton.getItemMeta();
- meta.setDisplayName("[" + j + "]");
- pinButton.setItemMeta(meta);
- }
- inventory.setItem(i, pinButton);
- }
- for(int i = 12, j = 4; i < 15 && j < 7; i++, j++) {
- ItemStack pinButton = new ItemStack(Material.IRON_BLOCK, j); {
- ItemMeta meta = pinButton.getItemMeta();
- meta.setDisplayName("[" + j + "]");
- pinButton.setItemMeta(meta);
- }
- inventory.setItem(i, pinButton);
- }
- for(int i = 21, j = 7; i < 24 && j < 10; i++, j++) {
- ItemStack pinButton = new ItemStack(Material.IRON_BLOCK, j); {
- ItemMeta meta = pinButton.getItemMeta();
- meta.setDisplayName("[" + j + "]");
- pinButton.setItemMeta(meta);
- }
- inventory.setItem(i, pinButton);
- }
- player.openInventory(inventory);
- }
Advertisement
Add Comment
Please, Sign In to add comment