{"id":16378933,"url":"https://github.com/nextdevv/kgui","last_synced_at":"2025-10-26T10:30:52.800Z","repository":{"id":191215314,"uuid":"684177399","full_name":"NextDevv/KGui","owner":"NextDevv","description":"A spigot API to create inventory GUIs!","archived":true,"fork":false,"pushed_at":"2024-06-02T09:53:23.000Z","size":65,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T11:26:54.548Z","etag":null,"topics":["bukkit","gui","java","minecraft","spigot"],"latest_commit_sha":null,"homepage":"https://www.spigotmc.org/resources/kgui.112366/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NextDevv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-28T16:02:31.000Z","updated_at":"2024-12-13T09:02:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"efd9a93b-2a56-4560-81e6-a145bc7992af","html_url":"https://github.com/NextDevv/KGui","commit_stats":null,"previous_names":["nextdevv/kgui"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NextDevv%2FKGui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NextDevv%2FKGui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NextDevv%2FKGui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NextDevv%2FKGui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NextDevv","download_url":"https://codeload.github.com/NextDevv/KGui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238310208,"owners_count":19450816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bukkit","gui","java","minecraft","spigot"],"created_at":"2024-10-11T03:46:59.988Z","updated_at":"2025-10-26T10:30:47.318Z","avatar_url":"https://github.com/NextDevv.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KGui - Easy Spigot Inventory GUI Creation\nKGui is a powerful and user-friendly API for creating inventory GUIs in Spigot plugins. It simplifies the process of designing interactive and dynamic GUIs for your Minecraft server, allowing you to focus on creating engaging player experiences without getting bogged down in complex GUI code.\n\n# Docs\nhttps://docs.nextdevv.com/\n\n## Features\n- Simple and intuitive API for GUI creation.\n- Easily add buttons, items, and interactive elements to your GUIs.\n- Flexible customization options for GUI appearance.\n- Pagination support for navigating through lists of items.\n- Built-in event listeners for item interactions.\n\n## Getting Started\nTo get started with KGui, follow these steps:\n1. **Dependency Setup:** Add KGui to your project's dependencies. You can either compile the library yourself or use a dependency management tool like Maven or Gradle.\n3. **Import KGui Classes:** Import the necessary classes at the beginning of your plugin class or wherever you intend to use KGui:\n```JAVA\nimport com.nextdevv.kgui.api.KGui;\nimport com.nextdevv.kgui.models.GuiButton;\nimport com.nextdevv.kgui.item.KItemStack;\nimport com.nextdevv.kgui.models.GuiBorder;\nimport com.nextdevv.kgui.models.Pages;\n```\n3. **Creating a Basic GUI:**\n\n  **java**\n```JAVA\n// Create a GUI border\nGuiBorder border = new GuiBorder();\nborder.setDefaultItemStack(new ItemStack(Material.RED_STAINED_GLASS_PANE));\n\n// Build the GUI\nKGui kGui = new KGui(PLUGIN);\nkGui.init()\nInventory gui = kGui.builder(PLAYER)\n    .setTitle(\"\u0026cItem Search\")\n    .setRows(6)\n    .setBorder(border)\n    .addButton(Alignment.BOTTOM_CENTER, new GuiButton().setItemStack(\n        KItemStack.builder()\n            .setName(\"\u0026c\u0026lSearch\")\n            .setMaterial(Material.COMPASS)\n            .build()\n    ).setOnClick((builder, player) -\u003e {\n        // Handle search button click\n        // ...\n    }))\n    .addItemStackClickListener((itemStack, player, builder) -\u003e {\n        // Handle item click\n        // ...\n    })\n    .build();\n```\n  **kotlin**\n```KOTLIN\n// Create a border\nval border = GuiBorder()\nborder.defaultItemStack = ItemStack(Material.RED_STAINED_GLASS_PANE)\n\n\n// Build the GUI\nval kGui = KGui(PLUGIN)\nkGui.init()\nval gui: Inventory = kGui.builder(PLAYER)\n  .setTitle(\"\u0026cItem Search\")\n  .setRows(6)\n  .setBorder(border)\n  .addButton(Alignment.BOTTOM_CENTER, GuiButton().setItemStack(\n      KItemStack.builder()\n        .setName(\"\u0026c\u0026lSearch\")\n        .setMaterial(Material.COMPASS)\n        .build()\n  ).setOnClick { builder: KGui.Builder, player: Player -\u003e \n  // Handle the click event\n  })\n  .addItemStackClickListener { itemStack: ItemStack, player: Player, builder: KGui.Builder -\u003e \n    // Handle the click event on the item\n  }\n  .build()\n```\n1. **Customize and Add Buttons:** You can add more buttons and customize your GUI's appearance and behavior using the provided methods like **`addButton`**, **`setTitle`**, and **`setCurrentPage`**.\n2. **Pagination Support:** The example code already demonstrates pagination using the \"Previous Page\" and \"Next Page\" buttons. You can extend this to display paginated content dynamically.\n3. **Event Handling:** Implement the click event handlers for your buttons and items using lambda expressions or dedicated methods.\n4. **Show GUI to Players:**\n```JAVA\nplayer.openInventory(gui);\n```\n\n## Contribution\nContributions to KGui are welcome! If you find any issues or have suggestions for improvements, feel free to submit a pull request or create an issue on the GitHub repository.\n\n## License\nKGui is licensed under the __**MIT License**__. Feel free to use, modify, and distribute this library in your projects.\n\n## Contact\nFor questions, support, or discussions, you can reach out to the project maintainers through the GitHub repository's issue section.\n\n\u003cbr\u003e\n\nWith KGui, creating interactive inventory GUIs for your Spigot server has never been easier. Enjoy a streamlined development process and enhance your players' experience with engaging and user-friendly interfaces.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextdevv%2Fkgui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextdevv%2Fkgui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextdevv%2Fkgui/lists"}