{"id":14969462,"url":"https://github.com/stefvanschie/if","last_synced_at":"2025-05-15T03:08:02.095Z","repository":{"id":26590116,"uuid":"108733772","full_name":"stefvanschie/IF","owner":"stefvanschie","description":"An inventory framework for managing GUIs","archived":false,"fork":false,"pushed_at":"2025-05-12T19:50:42.000Z","size":2185,"stargazers_count":451,"open_issues_count":218,"forks_count":92,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-12T20:51:31.151Z","etag":null,"topics":["bukkit","gui","hacktoberfest","inventory-framework","java","pane","spigot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefvanschie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2017-10-29T12:49:31.000Z","updated_at":"2025-05-12T17:48:40.000Z","dependencies_parsed_at":"2023-02-14T23:00:41.652Z","dependency_job_id":"d8dd7839-12f9-46ee-bd74-b9a5fb2b9baf","html_url":"https://github.com/stefvanschie/IF","commit_stats":{"total_commits":635,"total_committers":29,"mean_commits":"21.896551724137932","dds":0.4330708661417323,"last_synced_commit":"c54490c9b182bbf267adcdf43678e87e6da63f46"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefvanschie%2FIF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefvanschie%2FIF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefvanschie%2FIF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefvanschie%2FIF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefvanschie","download_url":"https://codeload.github.com/stefvanschie/IF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264769,"owners_count":22041794,"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","hacktoberfest","inventory-framework","java","pane","spigot"],"created_at":"2024-09-24T13:41:53.949Z","updated_at":"2025-05-15T03:07:57.079Z","avatar_url":"https://github.com/stefvanschie.png","language":"Java","readme":"# IF \u003ca href=\"https://discord.gg/RXmy4HdR4x\"\u003e\u003cimg align=\"right\" src=\"https://img.shields.io/discord/780514939293925407\" alt=\"Discord guild\"\u003e\u003c/a\u003e\n\n*This framework works for Minecraft versions 1.14-1.21*\n\nAn inventory framework for managing GUIs\n\nThis framework is based on a pane principle. This means that the GUI is divided into different types of panes which all behave differently. A GUI consists of multiple panes which can interact with each other.\n\nNext to those panes, GUIs can also be created from XML files by simple loading them in. This allows for easy GUI creation with little code.\n\n## Maven dependency\nTo add this project as a dependency to your pom.xml, add the following to your pom.xml:\n```XML\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.stefvanschie.inventoryframework\u003c/groupId\u003e\n    \u003cartifactId\u003eIF\u003c/artifactId\u003e\n    \u003cversion\u003e0.10.19\u003c/version\u003e\n\u003c/dependency\u003e\n```\nThe project is in the Central Repository, so specifying a repository is not needed.\n\nNow in order to shade the project into your project, add the following to your pom.xml:\n```XML\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n    \u003cartifactId\u003emaven-shade-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e3.5.2\u003c/version\u003e\n    \u003cconfiguration\u003e\n        \u003cdependencyReducedPomLocation\u003e${project.build.directory}/dependency-reduced-pom.xml\u003c/dependencyReducedPomLocation\u003e\n        \u003crelocations\u003e\n            \u003crelocation\u003e\n                \u003cpattern\u003ecom.github.stefvanschie.inventoryframework\u003c/pattern\u003e\n                \u003cshadedPattern\u003e[YOUR PACKAGE].inventoryframework\u003c/shadedPattern\u003e\n            \u003c/relocation\u003e\n        \u003c/relocations\u003e\n    \u003c/configuration\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cphase\u003epackage\u003c/phase\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003eshade\u003c/goal\u003e\n            \u003c/goals\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n```\nReplace [YOUR PACKAGE] with the top-level package of your project.\n\n## Gradle dependency\nTo add this project as a dependency for your Gradle project, make sure your `dependencies` section of your build.gradle looks like the following:\n```Groovy\ndependencies {\n    implementation 'com.github.stefvanschie.inventoryframework:IF:0.10.19'\n    // ...\n}\n```\nThe project is in Maven Central, so ensure your `repositories` section resembles the following:\n```Groovy\nrepositories {\n    mavenCentral()\n    // ...\n}\n```\nIn order to include the project in your own project, you will need to use the `shadowJar` plugin. If you don't have it already, add the following to the top of your file:\n```Groovy\nplugins {\n    // ...\n    id \"com.github.johnrengelman.shadow\" version \"7.1.2\"\n}\n```\nTo relocate the project's classes to your own namespace, add the following, with [YOUR PACKAGE] being the top-level package of your project:\n```Groovy\nshadowJar {\n    relocate 'com.github.stefvanschie.inventoryframework', '[YOUR PACKAGE].inventoryframework'\n}\n```\n\n## Dependency via plugin.yml\nIF does **not** support declaring the dependency via the libraries section in the plugin.yml. Please make use of a build tool as described above to use IF as a dependency.\n\n## Building from source\nIf you want to build this project from source, run the following:\n\n    git clone https://github.com/stefvanschie/IF.git\n\nThis will clone this repository to your device. This project relies on NMS, for which the dependencies are not available online. Because of this, you'll need to follow additional steps to obtain all these dependencies locally.\n\n### Installing Paper manually\nFor versions 1.14-1.16, we have to manually install Paper. Run the following scripts for each version to install the dependencies locally. Running these commands generate additional files in the folder where you execute them. To ensure that you don't accidentallly overwrite other files, execute this in an empty folder. The files that get created can be deleted afterwards (either after installing a single version or after installing all of them), since they're no longer necessary.\n\n#### 1.14.4\n```\nwget https://api.papermc.io/v2/projects/paper/versions/1.14.4/builds/243/downloads/paper-1.14.4-243.jar -O paperclip/paper-1.14.4.jar\njava -jar paper-1.14.4.jar\nmvn install:install-file -Dfile=cache/patched_1.14.4.jar -DgroupId=\"io.papermc\" -DartifactId=\"paper\" -Dversion=\"1.14.4-R0.1-SNAPSHOT\" -Dpackaging=\"jar\"\n```\n\n#### 1.15.2\n```\nwget https://api.papermc.io/v2/projects/paper/versions/1.15.2/builds/391/downloads/paper-1.15.2-391.jar -O paperclip/paper-1.15.2.jar\njava -jar paper-1.15.2.jar\nmvn install:install-file -Dfile=cache/patched_1.15.2.jar -DgroupId=\"io.papermc\" -DartifactId=\"paper\" -Dversion=\"1.15.2-R0.1-SNAPSHOT\" -Dpackaging=\"jar\"\n```\n\n#### 1.16.1\n```\nwget https://api.papermc.io/v2/projects/paper/versions/1.16.1/builds/138/downloads/paper-1.16.1-138.jar -O paperclip/paper-1.16.1.jar\njava -jar paper-1.16.1.jar\nmvn install:install-file -Dfile=cache/patched_1.16.1.jar -DgroupId=\"io.papermc\" -DartifactId=\"paper\" -Dversion=\"1.16.1-R0.1-SNAPSHOT\" -Dpackaging=\"jar\"\n```\n\n#### 1.16.3\n```\nwget https://api.papermc.io/v2/projects/paper/versions/1.16.3/builds/253/downloads/paper-1.16.3-253.jar -O paperclip/paper-1.16.3.jar\njava -jar paper-1.16.3.jar\nmvn install:install-file -Dfile=cache/patched_1.16.3.jar -DgroupId=\"io.papermc\" -DartifactId=\"paper\" -Dversion=\"1.16.3-R0.1-SNAPSHOT\" -Dpackaging=\"jar\"\n```\n\n#### 1.16.4\n```\nwget https://api.papermc.io/v2/projects/paper/versions/1.16.4/builds/416/downloads/paper-1.16.4-416.jar -O paperclip/paper-1.16.4.jar\njava -jar paper-1.16.4.jar\nmvn install:install-file -Dfile=cache/patched_1.16.4.jar -DgroupId=\"io.papermc\" -DartifactId=\"paper\" -Dversion=\"1.16.4-R0.1-SNAPSHOT\" -Dpackaging=\"jar\"\n```\n\n### Installing Paper via the maven plugin\nFor versions 1.17-1.20.4, we use Paper via the [paper-nms-maven-plugin](https://github.com/Alvinn8/paper-nms-maven-plugin). To install these versions locally, we must run a few maven commands. These commands should be ran in the root directory of the project.\n```\nmvn paper-nms:init -pl nms/1_17_0\nmvn paper-nms:init -pl nms/1_17_1\nmvn paper-nms:init -pl nms/1_18_0\nmvn paper-nms:init -pl nms/1_18_1\nmvn paper-nms:init -pl nms/1_18_2\nmvn paper-nms:init -pl nms/1_19_0\nmvn paper-nms:init -pl nms/1_19_1\nmvn paper-nms:init -pl nms/1_19_2\nmvn paper-nms:init -pl nms/1_19_3\nmvn paper-nms:init -pl nms/1_19_4\nmvn paper-nms:init -pl nms/1_20_0-1\nmvn paper-nms:init -pl nms/1_20_2\nmvn paper-nms:init -pl nms/1_20_3-4\n```\n\n### Installing Spigot via BuildTools\nFor versions 1.20.5-1.21.3, we use BuildTools. To install these versions, we run the following commands.\n```\nwget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O BuildTools.jar\n        \ngit clone https://hub.spigotmc.org/stash/scm/spigot/bukkit.git Bukkit\ncd Bukkit\ngit checkout 304e83eb384c338546aa96eea51388e0e8407e26\ncd ..\n\ngit clone https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git CraftBukkit\ncd CraftBukkit\ngit checkout 91b1fc3f1cf89e2591367dca1fa7362fe376f289\ncd ..\n\ngit clone https://hub.spigotmc.org/stash/scm/spigot/spigot.git Spigot\ncd Spigot\ngit checkout b698b49caf14f97a717afd67e13fd7ac59f51089\ncd ..\n\ngit clone https://hub.spigotmc.org/stash/scm/spigot/builddata.git BuildData\ncd BuildData\ngit checkout a7f7c2118b877fde4cf0f32f1f730ffcdee8e9ee\ncd ..\n\njava -jar BuildTools.jar --remapped --disable-java-check --dont-update\njava -jar BuildTools.jar --rev 1.20.6 --remapped --disable-java-check\n\ncd Bukkit\ngit checkout 2ec53f498e32b3af989cb24672fc54dfab087154\ncd ..\n\ncd CraftBukkit\ngit checkout 8ee6fd1b8db9896590aa321d0199453de1fc35db\ncd ..\n\ncd Spigot\ngit checkout fb8fb722a327a2f9f097f2ded700ac5de8157408\ncd ..\n\ncd BuildData\ngit checkout ae1e7b1e31cd3a3892bb05a6ccdcecc48c73c455\ncd ..\n\njava -jar BuildTools.jar --remapped --disable-java-check --dont-update\njava -jar BuildTools.jar --rev 1.21.1 --remapped --disable-java-check\njava -jar BuildTools.jar --rev 1.21.3 --remapped --disable-java-check\njava -jar BuildTools.jar --rev 1.21.4 --remapped --disable-java-check\n```\n\nYour environment is now set up correctly. To create a build, run the following inside the root folder of the project.\n```\nmvn clean package\n```\nYour build is now available in the /IF/target folder.\n\n## Adventure support\n\nIF supports [Adventure](https://github.com/KyoriPowered/adventure), but does not shade it in itself.\nThe use of Adventure `Component`s instead of legacy `String`s is completely optional.\nIf you do not wish to use Adventure you can safely ignore all `TextHolder` related methods.\n\n### What is Adventure?\n\nAdventure is a library that adds proper modern text support to Minecraft.\nModern text is represented using bungee-chat and `BaseComponent` instances in Spigot.\nAdventure is an alternative to bungee-chat and offers more features.\n\n### Using Adventure on 1.16.5+ Paper\n\nYou don't need to import/shade anything for Adventure support in this case!\n\n*Note: Paper only supports Adventure on build 473 and above. If you aren't running months old builds, then you are fine.*\n\n### Using Adventure on Spigot and older Paper\n\nOn Spigot Adventure isn't included in the server, therefore you have to shade and relocate it yourself.\nThe following dependencies need to be imported and shaded:\n- adventure-api\n- adventure-platform-bukkit\n\nPlease consult the [Adventure documentation](https://docs.adventure.kyori.net/) for more information.\n\n### How to use Adventure `Component`s\n\nExample of migration from legacy `String` to Adventure `Component`:\n - legacy: `namedGui.setTitle(\"My Title!\");`\n - Adventure: `namedGui.setTitle(ComponentHolder.of(Component.text(\"My Title!\")));`\n\nWe apologize for the boilerplate (the `ComponentHolder.of(...)` call), but that was the only way to not make IF hard-depend on Adventure.\n\nFull Adventure support is only achieved when your server natively supports Adventure (it is running Paper) and your plugin depends on Paper (instead of Spigot).\nIn other words, you won't benefit from Adventure as much if you use Spigot instead of Paper.\nThis is because when Adventure is relocated we have to convert everything back to legacy `String`s before passing them to the Bukkit API.\n\n---\n\nNOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefvanschie%2Fif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefvanschie%2Fif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefvanschie%2Fif/lists"}