Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6783

AnvilGUI items invisiblle.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • SpigotBuildTools, Maven, IntelliJ Ultimate.

    • 1.16.5
    • PlayerController
    • Yes

      I am trying to create a custom Anvil GUI for user input but when i call setItem(0, itemstack) it doesnt apear in the anvil gui.

      Inventory tmpinv = Bukkit.getServer().createInventory(usedBy, InventoryType.ANVIL, ChatColor.GREEN + "Enter Reason");
      //Switches old inventory with new
      PlayerManagerGuiHandler.getHandler().updateInventory(inventory, tmpinv);
      inventory = tmpinv;
      inventory.setItem(0, PlayerManagerGuiHandler.createGuiItem(Material.NAME_TAG, "Reason", "Enter your custom reason"));
      usedBy.openInventory(inventory);
      usedBy.updateInventory(); 

            md_5 md_5
            MondGnu MondGnu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: