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

AnvilGUI items invisiblle.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • SpigotBuildTools, Maven, IntelliJ Ultimate.

    • 1.16.5
    • PlayerController
    • Yes

    Description

      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(); 

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: